diff --git a/cmd/web.go b/cmd/web.go index f2f7279bf..f01b02783 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 2157fa10a..a51cbf53b 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 2838f6ee9..1b22251e5 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 bfc91a92c..66849cf54 100644 --- a/templates/admin/config.tmpl +++ b/templates/admin/config.tmpl @@ -178,7 +178,7 @@
{{.CacheConn}}