From fb9d8c5c18ca578dcbb22314cd8ab47b5f0214f3 Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 11 Jan 2023 00:51:10 -0800 Subject: [PATCH] Do not cache main index.html as it is server-rendered --- utils/utils.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/utils.go b/utils/utils.go index 9b69c2419..a8c6da378 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -199,6 +199,8 @@ func GetCacheDurationSecondsForPath(filePath string) int { return 0 } else if fileExtension == ".jpg" || fileExtension == ".png" || fileExtension == ".gif" || fileExtension == ".svg" { return 60 * 60 * 24 * defaultDaysCached + } else if fileExtension == ".html" { + return 0 } // Default cache length in seconds