ETag might be used in the future but is not available atm. I can only use "Cache-Control: no-cache" for the moment. The question is also why doesn't TS refresh if I send a "no-cache" request ? shouldn't it by default respect this header value ?
On Mon, Oct 3, 2016 at 1:23 PM, Reindl Harald <[email protected]> wrote: > > > Am 03.10.2016 um 13:18 schrieb Arnold Maderthaner: >> >> I have an issue with my TS setup. >> My use case is that I want to cache images in TS and keep them for a >> very long time and only go back to origin if needed (which is >> indicated by the client request). >> Caching basically works for me if I set >> proxy.config.http.cache.required_headers=0 as my origin server doesn't >> supply lifetime values. >> My issue is that sometimes the images changes and than I need to get a >> fresh copy from origin. >> So I tried to use "Cache Control:no-cache" header to obtain a new copy >> but TS still gives me the old version. I cannot use any time based >> triggers to obtain a new copy from origin as the images are more or >> less static (99% of the time) but there are exceptions where the >> client specifies with the Cache Control header to revalidate the data >> with origin > > > why don't you just define a short expire on the origin since when it's > reached ATS verifies with the ETAG header from the origin if it needs to > fetch again and if not the repsonse is just a "304 Not Modified" without any > body or overhead? > > "keep them for a very long time and only go back to origin if needed" sounds > like a very broken concept > > <IfModule mod_expires.c> > ExpiresActive On > ExpiresByType text/css A30 > ExpiresByType text/javascript A30 > ExpiresByType application/javascript A30 > ExpiresByType application/x-javascript A30 > ExpiresByType text/plain A30 > ExpiresByType text/xml A30 > ExpiresByType application/xhtml+xml A30 > ExpiresByType application/xml A30 > ExpiresByType image/jpeg A60 > ExpiresByType image/jpg A60 > ExpiresByType image/gif A60 > ExpiresByType image/png A60 > ExpiresByType text/html A60 > ExpiresByType text/comma-separated-values A60 > ExpiresByType text/tab-separated-values A60 > </IfModule>
