From 9f1ed2e5f53672a2e97b8994afe4dfc06b4e11f3 Mon Sep 17 00:00:00 2001 From: Jens Date: Mon, 20 Jun 2022 21:47:07 +0200 Subject: [PATCH] Prevent caching pages if user is authenticated --- controller/controller.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/controller/controller.go b/controller/controller.go index ff62b47..539ce97 100644 --- a/controller/controller.go +++ b/controller/controller.go @@ -108,7 +108,7 @@ func (c *Controller) RenderPage(ctx echo.Context, page Page) error { // cachePage caches the HTML for a given Page if the Page has caching enabled func (c *Controller) cachePage(ctx echo.Context, page Page, html *bytes.Buffer) { - if !page.Cache.Enabled { + if !page.Cache.Enabled || page.IsAuth { return }