don't generate cache on startup if UseCache is false

This commit is contained in:
Lilian Jónsdóttir 2024-01-23 13:53:59 -08:00
parent b9c0bd863b
commit cff59fe895

View file

@ -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!")
} }