diff options
author | Unknown <joe2010xtmf@163.com> | 2014-04-21 06:54:07 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-04-21 06:54:07 -0400 |
commit | de01f814892666298d24f79f769a7c0766119c87 (patch) | |
tree | 3abb9079920efb9055edceba771e3f2fd1ae2f56 /modules/base | |
parent | 660b47373d1adf8b39396e237d060a18c8959cd4 (diff) | |
download | gitea-de01f814892666298d24f79f769a7c0766119c87.tar.gz gitea-de01f814892666298d24f79f769a7c0766119c87.zip |
Prepare for v0.3.0 release
Diffstat (limited to 'modules/base')
-rw-r--r-- | modules/base/base_memcache.go | 11 | ||||
-rw-r--r-- | modules/base/base_redis.go | 11 | ||||
-rw-r--r-- | modules/base/conf.go | 7 |
3 files changed, 27 insertions, 2 deletions
diff --git a/modules/base/base_memcache.go b/modules/base/base_memcache.go new file mode 100644 index 0000000000..93ca93a4c7 --- /dev/null +++ b/modules/base/base_memcache.go @@ -0,0 +1,11 @@ +// +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 new file mode 100644 index 0000000000..327af8415b --- /dev/null +++ b/modules/base/base_redis.go @@ -0,0 +1,11 @@ +// +build redis + +package base + +import ( + _ "github.com/gogits/cache/redis" +) + +func init() { + EnableRedis = true +} diff --git a/modules/base/conf.go b/modules/base/conf.go index 720b861084..48ba46583a 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -77,6 +77,9 @@ var ( SessionManager *session.Manager PictureService string + + EnableRedis bool + EnableMemcache bool ) var Service struct { @@ -174,10 +177,10 @@ func newLogService() { func newCacheService() { CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory") - if cache.EnableRedis { + if EnableRedis { log.Info("Redis Enabled") } - if cache.EnableMemcache { + if EnableMemcache { log.Info("Memcache Enabled") } |