Re: [squid-users] Question for y'all?

From: Jakob Curdes <jc_at_info-systems.de>
Date: Fri, 19 Nov 2010 18:16:10 +0100

While I think Alex made a good point I will try to answer Michial's
original question.

Am 19.11.2010 16:00, Michial Thompson wrote:
> How well does Squid do for caching images that are displayed on a
> dynamically generated page? How well does it handle caching from a
> Windows Based Server?
>
You can configure what should be cached. Generally speaking, a GIF is a
GIF. If it is recognizable as a gif picture (i.e. there is actually a
link to a gif file somewhere in the HTML code), squid will cache this
item (depending on the Cache-Control parameters sent by the HTTP server)
without special configuration, regardless whether the HTML around it is
generated dynamically or not.
If the picture is some sort of a stream, or result of a query, you will
need more work to cache this. The "Windows Server" does not enter into
this picture, there are constructs very similar to ASP pages based on
other operating systems too. The basic question is whether you are able
to tell the proxy in some way which content is dynamic an which items
are static. See below.
> Not sure if this is even possible, but how does it handle dynamically
> generated pages that are really static in nature, just being generated
> from ASP/ASPX type pages?
You can configure squid to cache many sorts of http traffic, but
probably what you really want is give the "static" items (i.e. where the
content does not change every time) a file extension like "html" or
"htm" and have squid cache these OOTB while your "really-dynamic" pages
have an extension that is not cached ; otherwise you have no control
over the content your users get any more. I am not sure how you can do
this inside ASP; you could always place a reverse proxy (e.g. apache) in
front of your origin server that does this rewriting. The same is valid
for images etc; make them recognizable as static in some way and give
this information to the HTTP proxy.

Remember that a HTTP proxy like squid will not actually inspect the
*content* of the HTTP traffic, so it cannot do something like "oh this
byte stream looks like a gif header".

Another point: before pushing proxy boxes to your customers, you
probably want to make sure that you cannot achieve the same effect by
correctly setting the cache-control of you webserver (which will be read
by most browsers in a similar way that proxies do it). If you tell
browsers and proxies to throw every item away and re-fetch it after
viewing, adding a proxy would be pointless.

Hope this helps,
Jakob Curdes
Received on Fri Nov 19 2010 - 17:16:25 MST

This archive was generated by hypermail 2.2.0 : Fri Nov 19 2010 - 12:00:03 MST