Do not cache main index.html as it is server-rendered

This commit is contained in:
Gabe Kangas 2023-01-11 00:51:10 -08:00
parent 03217d36df
commit fb9d8c5c18
No known key found for this signature in database
GPG Key ID: 4345B2060657F330

View File

@ -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