[squid-users] Forced caching of some content in acceleration mode

From: Michael Boman <michael@dont-contact.us>
Date: Thu, 4 Oct 2007 10:53:59 +0800

Hi list,

I am working on a Microsoft SharePoint/IIS setup that doesn't want to
provide the "correct" caching headers. This is a deliberate design
feature from the people in Redmond, but it is not what we want to
have.

Due to the fact images are handled by SharePoint they leave the IIS
server with caching set to private, with a max-age of 0. The thing is
that these images are static, and I would much rather have them cached
by any upstream proxy and browser to limit the amount of traffic goes
to the server.

My idea is to put a squid proxy in front of the IIS/SharePoint server
to re-write the caching header to what I deem to be acceptable
(although I know I am breaking the HTTP standard by doing so).

This is one of the configuration lines (many like this, one for each
file extension I want to force caching for):

refresh_pattern .jpg 14400 50% 18000 override-expire override-lastmod
reload-into-ims ignore-reload ignore-no-cache ignore-private
ignore-auth

By right that one should cache all .jpg requests for 4-5 hours,
regardless what the originating web server says. However, when I use
Fiddler (a pretty cool HTTP debugging proxy) I still see my .jpg image
responses as private with a max-age set to 0.

I am running 2.6stable16. Could someone please enlighten me what seems
to be wrong?

Full config can be found at http://michaelboman.org/wiki/index.php?title=Squid

Best regards
 Michael Boman

-- 
IT Security Researcher & Developer
http://michaelboman.org
Received on Wed Oct 03 2007 - 20:54:09 MDT

This archive was generated by hypermail pre-2.1.9 : Thu Nov 01 2007 - 13:00:01 MDT