Forum Moderators: phranque
Here is a snip of the .conf
################ CONF ####################
IfModule mod_cache.c>
<IfModule mod_disk_cache.c>
UseCanonicalName On
CacheRoot /pagecache
CacheEnable disk /
CacheDisable /image_assets
CacheDisable /images
CacheDisable /pictures
CacheDisable /flash
CacheIgnoreNoLastMod On
CacheIgnoreCacheControl Off
CacheIgnoreHeaders Set-Cookie
CacheDefaultExpire 360
CacheDirLevels 2
CacheDirLength 1
</IfModule>
</IfModule>
<Proxy balancer://sitev2_cluster>
ExpiresActive On
ExpiresDefault A86400
ExpiresByType application/xml A600
ExpiresByType text/xml A300
ExpiresByType text/html A300
ExpiresByType image/x-icon A2592000
ExpiresByType text/javascript A644800
ExpiresByType text/css A644800
ExpiresByType image/gif A604800
ExpiresByType image/png A604800
ExpiresByType image/jpeg A604800
ExpiresByType application/x-shockwave-flash A604800
ExpiresByType video/x-flv A604800
ExpiresByType application/pdf A604800
Header set Cache-Control "must-revalidate"
Header unset Vary
BalancerMember [127.0.0.1:7000...]
BalancerMember [127.0.0.1:7001...]
BalancerMember [127.0.0.1:7002...]
</Proxy>
ProxyPass / balancer://sitev2_cluster/
ProxyPassReverse / balancer://sitev2_cluster/
ProxyRequests Off
################ END CONF ####################
Now files are being written to /pagecache so it appears to work until you look at the headers and log that the backend generates. It seems that it still gets hit for content that should be cached. For example the homepage will show up as being requested in the backend logs at 05:00 that should then be picked up and used by Apache for 5minutes right?
Instead I'll see more requests for it at 05:10 05:30 06:00 etc. Does Apache check with the backend for some reason before serving up the cached version?
The backend doesn't write files itself but does return a Content-Type: for text/html or application/xml whatever is appropriate.
Anyone having any experience with this type of setup I'd really appreciate hearing from you.