From 6a81632e36a1ba36d315059cfb69c063cab237f1 Mon Sep 17 00:00:00 2001 From: Thibault Meyer <0xbaadf00d@users.noreply.github.com> Date: Thu, 11 Aug 2016 14:59:11 +0200 Subject: [PATCH] Fix typo CacheInternal -> CacheInterval (#3432) --- cmd/web.go | 2 +- modules/setting/setting.go | 4 ++-- routers/admin/admin.go | 2 +- templates/admin/config.tmpl | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) 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 @@
{{.CacheConn}}