Am 30.01.2014 01:25, schrieb Tim Traver: > So, I'm trying to set up some rules in my reverse proxy to not cache certain > objects, as they get changed > frequently enough by the users as to annoy them, and I don't have an easy > method for them to clear caches for > particular objects just yet. > > So, in my cache.config file I have a rule like this : > > dest_domain=domain.com suffix=css action=never-cache > > > If I understand that correctly, that should tell ATS to never cache files > that end in .css > > But when I have that in place, I still see the initial hit going to the > origin server, and then subsequent requests > getting served by ATS with the cH flag meaning that it got it from its cache. > > I know there are more moving parts as to other config settings that might be > clobbering this one, but is that > basically the correct way to have ATS ignore certain file types? > > I essentially want to make this reverse proxy only cache image files, which > are truly static for now
just look in your origins access log - i bet the requests after the first are answered with status 304 which means "Not modified" because httpd send an ETAG and ATS sends If-Not-Modified headers, so the origin is contacted but get the checksum of the reverse-proxy and aswers "no change" however, i would *not* solve that on the reverse-proxy just configure the origin to send teh correct expires headers even in case the CSS is changed all day long is 2 seconds caching fine and if you ever get a high load on that site it makes a difference if ATS asks every request for a new version or for 2 seconds not contacts the origin at all <IfModule mod_expires.c> ExpiresActive On ExpiresByType text/css A2 ExpiresByType image/jpeg A60 ExpiresByType image/jpg A60 ExpiresByType image/gif A60 ExpiresByType image/png A60 ExpiresByType text/html A60 ExpiresByType text/javascript A60 ExpiresByType text/comma-separated-values A60 ExpiresByType text/tab-separated-values A60 ExpiresByType application/javascript A60 ExpiresByType application/x-javascript A60 ExpiresByType application/xhtml+xml A60 ExpiresByType application/xml A60 </IfModule>
signature.asc
Description: OpenPGP digital signature
