[GitHub] [trafficserver] mlibbey commented on issue #9939: How to config ATS to refresh cache for files modified on server

2023-07-01 Thread via GitHub


mlibbey commented on issue #9939:
URL: https://github.com/apache/trafficserver/issues/9939#issuecomment-1615999358

   Guess a few best practices:
   - Have the origin version assets when changed -- query strings; checksums in 
the path... something that makes the new content get a unique cache key. That 
way, new content is fetched once users start requesting it.
   - Have the origin set the Cache-Control header instead of using cache.config 
to define the cache policy. 
   - If versioning is not possible, have the origin set the max-age to how fast 
they need the new content to appear -- noting that shorter max-age times means 
more load on origin (and more frequent slower user experience). For example for 
daily content, they would be ok with content showing up within an hour after 
publishing -- then set max-age=3600.
   
   You can purge individual objects with the PURGE method -- eg, curl -XPURGE 
"http://example.com/foo.jpg";. You could also invalidate the entire cache for a 
remap rule via the [proxy.config.http.cache.generation]( 
https://docs.trafficserver.apache.org/admin-guide/files/records.config.en.html#proxy-config-http-cache-generation)
 setting override. There is also a [Regex Revalidation 
Plugin](https://docs.trafficserver.apache.org/admin-guide/plugins/regex_revalidate.en.html)
 where you give a list of regexes to invalidate on the next request.  


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [trafficserver] 2803media opened a new issue, #9939: How to config ATS to refresh cache for files modify on server

2023-07-01 Thread via GitHub


2803media opened a new issue, #9939:
URL: https://github.com/apache/trafficserver/issues/9939

   Hi 
   
   I run an ATS in production and I have files that are updated every day and a 
cache config of 60 days cache by default. I just want to know if it's possible 
to invalidate those files if the files are newly modify or if the simplest way 
is to exclude the files folder from the cache which is the worst way for me in 
a cache logic.
   
   Thanks for your advise and example if you have somes


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@trafficserver.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org