From 2f820e01d8ed627284c1f8aa278b029377d22657 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sun, 25 May 2014 20:17:26 -0400 Subject: [PATCH] Fixed #209 --- modules/base/base_memcache.go | 11 ----------- modules/base/base_redis.go | 12 ------------ modules/setting/setting_memcache.go | 15 +++++++++++++++ modules/setting/setting_redis.go | 16 ++++++++++++++++ 4 files changed, 31 insertions(+), 23 deletions(-) delete mode 100644 modules/base/base_memcache.go delete mode 100644 modules/base/base_redis.go create mode 100644 modules/setting/setting_memcache.go create mode 100644 modules/setting/setting_redis.go diff --git a/modules/base/base_memcache.go b/modules/base/base_memcache.go deleted file mode 100644 index 93ca93a4c7..0000000000 --- a/modules/base/base_memcache.go +++ /dev/null @@ -1,11 +0,0 @@ -// +build memcache - -package base - -import ( - _ "github.com/gogits/cache/memcache" -) - -func init() { - EnableMemcache = true -} diff --git a/modules/base/base_redis.go b/modules/base/base_redis.go deleted file mode 100644 index 42430df774..0000000000 --- a/modules/base/base_redis.go +++ /dev/null @@ -1,12 +0,0 @@ -// +build redis - -package base - -import ( - _ "github.com/gogits/cache/redis" - _ "github.com/gogits/session/redis" -) - -func init() { - EnableRedis = true -} diff --git a/modules/setting/setting_memcache.go b/modules/setting/setting_memcache.go new file mode 100644 index 0000000000..e509f372d3 --- /dev/null +++ b/modules/setting/setting_memcache.go @@ -0,0 +1,15 @@ +// +build memcache + +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + _ "github.com/gogits/cache/memcache" +) + +func init() { + EnableMemcache = true +} diff --git a/modules/setting/setting_redis.go b/modules/setting/setting_redis.go new file mode 100644 index 0000000000..78b31d534f --- /dev/null +++ b/modules/setting/setting_redis.go @@ -0,0 +1,16 @@ +// +build redis + +// Copyright 2014 The Gogs Authors. All rights reserved. +// Use of this source code is governed by a MIT-style +// license that can be found in the LICENSE file. + +package setting + +import ( + _ "github.com/gogits/cache/redis" + _ "github.com/gogits/session/redis" +) + +func init() { + EnableRedis = true +}