From cff59fe895ea68ac49a13b23325ec3b8a35bf60f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lilian=20J=C3=B3nsd=C3=B3ttir?= Date: Tue, 23 Jan 2024 13:53:59 -0800 Subject: [PATCH] don't generate cache on startup if UseCache is false --- internal/render/render.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/render/render.go b/internal/render/render.go index 71b109a..18bd5cc 100644 --- a/internal/render/render.go +++ b/internal/render/render.go @@ -24,7 +24,9 @@ var app *config.AppConfig func Initialise(a *config.AppConfig) { var err error app = a - app.TemplateCache, err = GenerateNewTemplateCache() + if app.UseCache { + app.TemplateCache, err = GenerateNewTemplateCache() + } if err != nil { app.Logger.Fatal("Error generating template cache, bailing out!") }