Merge pull request #11 from arrkiin/dont_cache_auth

Prevent caching pages if user is authenticated
This commit is contained in:
Mike Stefanello 2022-06-21 09:49:11 -04:00 committed by GitHub
commit 0cc95d4c64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 // 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) { func (c *Controller) cachePage(ctx echo.Context, page Page, html *bytes.Buffer) {
if !page.Cache.Enabled { if !page.Cache.Enabled || page.IsAuth {
return return
} }