From b7865c92b55d841c126c7495697541b5be98f6be Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Sun, 7 Nov 2021 19:53:01 -0800 Subject: [PATCH] Increase cache duration for resources --- utils/utils.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/utils/utils.go b/utils/utils.go index 3d2636c6a..0eef68fd5 100644 --- a/utils/utils.go +++ b/utils/utils.go @@ -177,7 +177,7 @@ func GetCacheDurationSecondsForPath(filePath string) int { return 20 } else if fileExtension == ".js" || fileExtension == ".css" { // Cache javascript & CSS - return 60 * 10 + return 60 * 60 * 3 } else if fileExtension == ".ts" { // Cache video segments as long as you want. They can't change. // This matters most for local hosting of segments for recordings @@ -186,11 +186,11 @@ func GetCacheDurationSecondsForPath(filePath string) int { } else if fileExtension == ".m3u8" { return 0 } else if fileExtension == ".jpg" || fileExtension == ".png" || fileExtension == ".gif" || fileExtension == ".svg" { - return 60 * 60 * 24 + return 60 * 60 * 24 * 7 } // Default cache length in seconds - return 60 * 10 + return 60 * 60 * 2 } // IsValidURL will return if a URL string is a valid URL or not.