don't generate cache on startup if UseCache is false
This commit is contained in:
parent
b9c0bd863b
commit
cff59fe895
|
@ -24,7 +24,9 @@ var app *config.AppConfig
|
||||||
func Initialise(a *config.AppConfig) {
|
func Initialise(a *config.AppConfig) {
|
||||||
var err error
|
var err error
|
||||||
app = a
|
app = a
|
||||||
|
if app.UseCache {
|
||||||
app.TemplateCache, err = GenerateNewTemplateCache()
|
app.TemplateCache, err = GenerateNewTemplateCache()
|
||||||
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
app.Logger.Fatal("Error generating template cache, bailing out!")
|
app.Logger.Fatal("Error generating template cache, bailing out!")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue