summaryrefslogtreecommitdiffstats
path: root/modules/setting/cache.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/setting/cache.go')
-rw-r--r--modules/setting/cache.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/modules/setting/cache.go b/modules/setting/cache.go
index 7bfea91961..2bfe2318f5 100644
--- a/modules/setting/cache.go
+++ b/modules/setting/cache.go
@@ -58,11 +58,16 @@ func newCacheService() {
log.Fatal("Failed to map Cache settings: %v", err)
}
- CacheService.Adapter = sec.Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache"})
+ CacheService.Adapter = sec.Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache", "twoqueue"})
switch CacheService.Adapter {
case "memory":
case "redis", "memcache":
CacheService.Conn = strings.Trim(sec.Key("HOST").String(), "\" ")
+ case "twoqueue":
+ CacheService.Conn = strings.TrimSpace(sec.Key("HOST").String())
+ if CacheService.Conn == "" {
+ CacheService.Conn = "50000"
+ }
case "": // disable cache
CacheService.Enabled = false
default: