my project clientlib-react.lc-e686exxxxxxxlc.min.js file has below headers ,
please advice how to reducing this cache to 1hr
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hi @Vishnu9 ,
You may use dispatcher Header set
Js/Css files for(12 hours)
<LocationMatch "^/etc\.clientlibs/.*\.(?i:js|css|ttf|woff2)$">
Header set Cache-Control "max-age=2592000,stale-while-revalidate=43200,stale-if-error=43200,public,immutable" "expr=%{REQUEST_STATUS} < 400"
Header set Age 0
</LocationMatch>
for 1 hour
Header set Cache-Control "max-age=3600,stale-while-revalidate=3600,stale-if-error=3600,public,immutable" "expr=%{REQUEST_STATUS} < 400"
Note:- Instead of refreshing whole clientlibs every hour you may create separate clientlib and write rules of 1 hour for that cleintlib only and for other clientlib you may keep 12 hrs
Thanks
Hi @Vishnu9 ,
You may use dispatcher Header set
Js/Css files for(12 hours)
<LocationMatch "^/etc\.clientlibs/.*\.(?i:js|css|ttf|woff2)$">
Header set Cache-Control "max-age=2592000,stale-while-revalidate=43200,stale-if-error=43200,public,immutable" "expr=%{REQUEST_STATUS} < 400"
Header set Age 0
</LocationMatch>
for 1 hour
Header set Cache-Control "max-age=3600,stale-while-revalidate=3600,stale-if-error=3600,public,immutable" "expr=%{REQUEST_STATUS} < 400"
Note:- Instead of refreshing whole clientlibs every hour you may create separate clientlib and write rules of 1 hour for that cleintlib only and for other clientlib you may keep 12 hrs
Thanks
Hi,
You need to find where these headers are being set, this could be found in the dispatcher or CDN most frequently, once you find that configuration, you need to decrease the value to the one you need.
Hope this helps
@Vishnu9 Did you find the suggestions from users helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies