What is the static file and media asset cache duration recommended by Episerver?

Vote:
 

Internally we have a bit of a debate how long to set our cache headers for static content to. One person wants it to be 7 days, another 30, another a year. We have an internal policy that once images are published they cannot be changed. They must upload a new image instead. Based on that, how long should we set our duration for based on best practices? Opinions welcome.

#207994
Oct 10, 2019 0:26
Vote:
 

Hi Jason,

Episerver suggests you should cache the "staticFile" and "staticcontent" for at least 365 days.

<staticContent>
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
<staticFile expirationTime ="365.00:00:00"
cacheControl="Private" enableOutputCache= "true"/>

and implement the cache bust approach to clear the cache if any change in CSS or js files. One more thing now Episerver also provides you the ability to clear the CDN cache for Paas Portal.

#207999
Oct 10, 2019 7:54
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.