To put it simply, Squid does what you tell it to.
You have a lot of ways you can tell Squid what to do, and many of them
are specific to your webserver--not Squid. Squid respects
cache-control information from your server, and respects expiry information.
Squid also generally does not, cache anything it thinks is CGI generated
(this is kind of specific to your method of install--some packages have
these lines uncommented and some do not). That's these two lines in
your squid.conf:
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
Since you know your content better than we do, so you'll want to sit
down with a map of your website URL space and figure out what you want
to be cached and what you don't...and then figure out what rules you'll
need to represent that behavior.
All that being said, you can't have it both ways...you can't have the
origin server keeping notes of every object fetched, if you also want
the Squid server to be providing any benefit. You /can/ be selective
about what is cached however, and what I usually recommend for folks who
must have complete logging from the origin server (because they already
have some log analyses tools in place that they cannot change and do not
support Squid logs) is to place a 1x1 pixel transparent GIF somewhere on
each page that is marked as not being cachable (or has been explicitly
configured as no_cache in Squid). That will give you everything you
need in the logs to trace your users throughout the site, and will allow
you to forget about logging stuff and worry only about tuning your
no_cache policies to suit your content.
Others who run acelerators have probably got other ideas for handling
these issues, and hopefully they'll chip in their thoughts as well.
Good luck.
Cycle Rider wrote:
> I have a web site where the entire site is built in
> Cold Fusion (similar to ASP)
>
> If I cache a page which has a cgi script in it for
> rendering a banner ad, what happens to the banner ad?
> Will a user see a new banner on every page refresh or
> will the banner displayed at the time the page was
> cached be permanently displayed? Will cacheing mess
> up my site usage statistics? What happens to say the
> data in my log files that webtrends reports on?
--
Joe Cooper <joe@swelltech.com>
Affordable Web Caching Proxy Appliances
http://www.swelltech.com
Received on Wed May 23 2001 - 08:24:55 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 17:00:15 MST