Please read the following: http://www.mnot.net/cache_docs/ This is an
outstanding tutorial that explains why some things are cacheable and some
are not.
-----Original Message-----
From: Denis Haskin [mailto:dwhaskin@earthlink.net]
Sent: Monday, April 09, 2001 3:12 PM
To: Squid Users List
Subject: [squid-users] How to determine why an object isn't being
cached?
I'm experimenting with Squid 2.4.STABLE1 and am having difficulty in
"loosening" up the configuration to cache objects that I need to have
cached.
The objects I'm primarily concerned about are CGIs, but they're under my
control and so I know the contents should be deemed cachable, and in
fact I'm pretty sure the responses have got the right headers to
facilitate proper caching behavior. Note that I'm using Squid as an
httpd accelerator, not a proxy caching server.
I can retrieve the content just fine, but the access.log and store.log
file indicate to me that the objects are not being cached.
The objects do require NCSA Basic authentication, and Squid is handling
that properly. Could that be preventing caching? While the Squid doc
is pretty good compared to much open-source doc, I find it a little
vague on how authentication affects cachability.
The only (relevant) change I made to squid.conf was to comment out the 2
lines that explicitly prevent CGI-like URLs from being cached:
# acl QUERY urlpath_regex cgi-bin \?
# no_cache deny QUERY
(although it's unclear whether some default is now kicking in--should I
change the "no_cache deny" to "no_cache allow"?)
I've checked store.log and according to the times recorded there, and
walking through refresh algorithm given in the 1.1 release notes, I
believe the object should be kept in cache, specifically:
NOW = 986841350.8 (I assume the timestamp in the log is the same as NOW)
OBJECT_DATE = 986841345
LAST_MODIFIED_TIME = 986841350 (this is a bug in my code that it's later
than OBJECT_DATE, but it doesn't appear that would affect the algorithm)
EXPIRES = 986927750
which gives me calculated values of:
AGE = about 5.78
LM_AGE = -5
LM_FACTOR = about -1.16
Is there something else I'm missing? Is there any way (short of
stepping thru the debugger) to get Squid to tell me in a little more
detail why the object was not kept in cache?
Much thanks in advance,
Denis Haskin
Received on Mon Apr 09 2001 - 13:49:22 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:59:14 MST