diff options
Diffstat (limited to 'modules/setting/cache.go')
-rw-r--r-- | modules/setting/cache.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/setting/cache.go b/modules/setting/cache.go index 2da79adb3b..783246077d 100644 --- a/modules/setting/cache.go +++ b/modules/setting/cache.go @@ -49,8 +49,8 @@ var CacheService = struct { // MemcacheMaxTTL represents the maximum memcache TTL const MemcacheMaxTTL = 30 * 24 * time.Hour -func newCacheService() { - sec := Cfg.Section("cache") +func loadCacheFrom(rootCfg ConfigProvider) { + sec := rootCfg.Section("cache") if err := sec.MapTo(&CacheService); err != nil { log.Fatal("Failed to map Cache settings: %v", err) } @@ -79,7 +79,7 @@ func newCacheService() { Service.EnableCaptcha = false } - sec = Cfg.Section("cache.last_commit") + sec = rootCfg.Section("cache.last_commit") if !CacheService.Enabled { CacheService.LastCommit.Enabled = false } |