mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-29 15:13:53 +03:00
Fix typo CacheInternal -> CacheInterval (#3432)
This commit is contained in:
parent
b756806ee9
commit
6a81632e36
4 changed files with 5 additions and 5 deletions
|
@ -157,7 +157,7 @@ func newMacaron() *macaron.Macaron {
|
||||||
m.Use(cache.Cacher(cache.Options{
|
m.Use(cache.Cacher(cache.Options{
|
||||||
Adapter: setting.CacheAdapter,
|
Adapter: setting.CacheAdapter,
|
||||||
AdapterConfig: setting.CacheConn,
|
AdapterConfig: setting.CacheConn,
|
||||||
Interval: setting.CacheInternal,
|
Interval: setting.CacheInterval,
|
||||||
}))
|
}))
|
||||||
m.Use(captcha.Captchaer(captcha.Options{
|
m.Use(captcha.Captchaer(captcha.Options{
|
||||||
SubURL: setting.AppSubUrl,
|
SubURL: setting.AppSubUrl,
|
||||||
|
|
|
@ -164,7 +164,7 @@ var (
|
||||||
|
|
||||||
// Cache settings
|
// Cache settings
|
||||||
CacheAdapter string
|
CacheAdapter string
|
||||||
CacheInternal int
|
CacheInterval int
|
||||||
CacheConn string
|
CacheConn string
|
||||||
|
|
||||||
// Session settings
|
// Session settings
|
||||||
|
@ -645,7 +645,7 @@ func newCacheService() {
|
||||||
CacheAdapter = Cfg.Section("cache").Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache"})
|
CacheAdapter = Cfg.Section("cache").Key("ADAPTER").In("memory", []string{"memory", "redis", "memcache"})
|
||||||
switch CacheAdapter {
|
switch CacheAdapter {
|
||||||
case "memory":
|
case "memory":
|
||||||
CacheInternal = Cfg.Section("cache").Key("INTERVAL").MustInt(60)
|
CacheInterval = Cfg.Section("cache").Key("INTERVAL").MustInt(60)
|
||||||
case "redis", "memcache":
|
case "redis", "memcache":
|
||||||
CacheConn = strings.Trim(Cfg.Section("cache").Key("HOST").String(), "\" ")
|
CacheConn = strings.Trim(Cfg.Section("cache").Key("HOST").String(), "\" ")
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -216,7 +216,7 @@ func Config(ctx *context.Context) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx.Data["CacheAdapter"] = setting.CacheAdapter
|
ctx.Data["CacheAdapter"] = setting.CacheAdapter
|
||||||
ctx.Data["CacheInternal"] = setting.CacheInternal
|
ctx.Data["CacheInterval"] = setting.CacheInterval
|
||||||
ctx.Data["CacheConn"] = setting.CacheConn
|
ctx.Data["CacheConn"] = setting.CacheConn
|
||||||
|
|
||||||
ctx.Data["SessionConfig"] = setting.SessionConfig
|
ctx.Data["SessionConfig"] = setting.SessionConfig
|
||||||
|
|
|
@ -178,7 +178,7 @@
|
||||||
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_adapter"}}</dt>
|
||||||
<dd>{{.CacheAdapter}}</dd>
|
<dd>{{.CacheAdapter}}</dd>
|
||||||
<dt>{{.i18n.Tr "admin.config.cache_interval"}}</dt>
|
<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}}
|
{{if .CacheConn}}
|
||||||
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
<dt>{{.i18n.Tr "admin.config.cache_conn"}}</dt>
|
||||||
<dd><code>{{.CacheConn}}</code></dd>
|
<dd><code>{{.CacheConn}}</code></dd>
|
||||||
|
|
Loading…
Reference in a new issue