diff --git a/cmd/web.go b/cmd/web.go index f2f7279bf0..f01b027831 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -157,7 +157,7 @@ func newMacaron() *macaron.Macaron { m.Use(cache.Cacher(cache.Options{ Adapter: setting.CacheAdapter, AdapterConfig: setting.CacheConn, - Interval: setting.CacheInternal, + Interval: setting.CacheInterval, })) m.Use(captcha.Captchaer(captcha.Options{ SubURL: setting.AppSubUrl, diff --git a/modules/setting/setting.go b/modules/setting/setting.go index 2157fa10aa..a51cbf53be 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -164,7 +164,7 @@ var ( // Cache settings CacheAdapter string - CacheInternal int + CacheInterval int CacheConn string // Session settings @@ -645,7 +645,7 @@ func newCacheService() { CacheAdapter = Cfg.Section("cache").Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache"}) switch CacheAdapter { case "memory": - CacheInternal = Cfg.Section("cache").Key("INTERVAL").MustInt(60) + CacheInterval = Cfg.Section("cache").Key("INTERVAL").MustInt(60) case "redis", "memcache": CacheConn = strings.Trim(Cfg.Section("cache").Key("HOST").String(), "\" ") default: diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 2838f6ee91..1b22251e55 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -216,7 +216,7 @@ func Config(ctx *context.Context) { } ctx.Data["CacheAdapter"] = setting.CacheAdapter - ctx.Data["CacheInternal"] = setting.CacheInternal + ctx.Data["CacheInterval"] = setting.CacheInterval ctx.Data["CacheConn"] = setting.CacheConn ctx.Data["SessionConfig"] = setting.SessionConfig diff --git a/templates/admin/config.tmpl b/templates/admin/config.tmpl index bfc91a92c5..66849cf541 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -178,7 +178,7 @@
{{.i18n.Tr "admin.config.cache_adapter"}}
{{.CacheAdapter}}
{{.i18n.Tr "admin.config.cache_interval"}}
-
{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}
+
{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}
{{if .CacheConn}}
{{.i18n.Tr "admin.config.cache_conn"}}
{{.CacheConn}}