summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThibault Meyer <0xbaadf00d@users.noreply.github.com>2016-08-11 14:59:11 +0200
committer无闻 <u@gogs.io>2016-08-11 05:59:11 -0700
commit6a81632e36a1ba36d315059cfb69c063cab237f1 (patch)
tree58e85cf7e9aef07bd879eecb45ed2a6a7f4ceda8
parentb756806ee99f28c4fa6ff824037f92800af4bf72 (diff)
downloadgitea-6a81632e36a1ba36d315059cfb69c063cab237f1.tar.gz
gitea-6a81632e36a1ba36d315059cfb69c063cab237f1.zip
Fix typo CacheInternal -> CacheInterval (#3432)
-rw-r--r--cmd/web.go2
-rw-r--r--modules/setting/setting.go4
-rw-r--r--routers/admin/admin.go2
-rw-r--r--templates/admin/config.tmpl2
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 @@
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
<dd>{{.CacheAdapter}}</dd>
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
- <dd>{{.CacheInternal}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
+ <dd>{{.CacheInterval}} {{.i18n.Tr "tool.raw_seconds"}}</dd>
{{if .CacheConn}}
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
<dd><code>{{.CacheConn}}</code></dd>