On Wed, 14 Jan 2004, Ken wrote:
> Hi all,
>
> Caching is not happening the way I expected.
>
> I am using Squid to cache the 'expensive' output of a Zope server.
>Due to increased traffic on the site, I am getting many server
>errors (database conflict), so it is urgent that objects be cached.
>I instructed Zope to insert a Cache-Control header with 'max-age=7776000'.
>The object should be cached even if refreshment would result in
>changes.
>
> All pages are made from the same script which I have tested with
>the Cacheability Engine. The response is, 'This object will be fresh
>for 12 weeks 6 days. The object had changed when validation was
>attempted'.
>
> If I understand correctly from the log extracts below (access.log,
>store.log and Zope's Z2.log), the object has been dropped and
>re-entered into the cache. Why? How can I prevent this?
>
> Thanks in advance!
>
> Ken
>
> --
>
> 202.202.202.202 - - [14/Jan/2004:01:47:45 +0100] "GET http://mysite.com:81/pathto/object_xyz HTTP/1.1" 500 2462 TCP_MISS:DIRECT
> 61.61.61.61 - - [14/Jan/2004:03:10:00 +0100] "GET http://mysite.com:81/pathto/object_xyz HTTP/1.0" 200 22366 TCP_MISS:DIRECT
> 64.64.64.64 - - [14/Jan/2004:03:15:06 +0100] "GET http://mysite.com:81/pathto/object_xyz HTTP/1.0" 200 22370 TCP_HIT:NONE
> 202.202.202.202 - - [14/Jan/2004:09:08:12 +0100] "GET http://mysite.com:81/pathto/object_xyz HTTP/1.1" 200 21699 TCP_MISS:DIRECT
> 206.168.0.6 - - [14/Jan/2004:09:27:07 +0100] "GET http://mysite.com:81/pathto/object_xyz HTTP/1.0" 200 21694 TCP_CLIENT_REFRESH_MISS:DIRECT
>
> 1074046198.938 RELEASE -1 FFFFFFFF C927B08545BF24772B34082FC7B5AC2A 500 1074041265 -1 1081817265 text/html 1865/1865 GET http://mysite.com:81/pathto/object_xyz
> 1074046199.623 SWAPOUT 00 00002075 C927B08545BF24772B34082FC7B5AC2A 200 1074046199 -1 1081822199 text/html 22053/22053 GET http://mysite.com:81/pathto/object_xyz
> 1074067689.816 SWAPOUT 00 00003591 C927B08545BF24772B34082FC7B5AC2A 200 1074067689 -1 1081843689 text/html 21386/21386 GET http://mysite.com:81/pathto/object_xyz
> 1074068826.935 SWAPOUT 00 00003662 C927B08545BF24772B34082FC7B5AC2A 200 1074068826 -1 1081844826 text/html 21386/21386 GET http://mysite.com:81/pathto/object_xyz
>
> 123.45.678.90 - Anonymous [14/Jan/2004:01:47:45 +0200] "GET /pathto/object_xyz HTTP/1.0" 200 2421 "" ""
> 123.45.678.90 - Anonymous [14/Jan/2004:03:09:59 +0200] "GET /pathto/object_xyz HTTP/1.0" 200 22325 "" ""
> 123.45.678.90 - Anonymous [14/Jan/2004:09:08:09 +0200] "GET /pathto/object_xyz HTTP/1.0" 200 21658 "" ""
> 123.45.678.90 - Anonymous [14/Jan/2004:09:27:06 +0200] "GET /pathto/object_xyz HTTP/1.0" 200 21658 "" "CacheabilityEngine/1.30 <http://www.mnot.net/cacheability/>"
>
From your access log, you got
(1) an error
(2) a miss
(3) a hit
(4) a miss
(5) a miss
The (4) miss is hard to explain without seeing all the HTTP headers.
It might have something to do with content-negotiation (Vary header).
For one thing, notice that (4) has HTTP/1.1 while the previous two
have HTTP/1.0.
(5) is a miss because the client hit 'Reload' or included a
'cache-control: no-cache' header. Since you are using Squid has
an http accelerator, you probably want to ignore those reloads by
making a 'refresh_pattern' rule that uses the 'ignore-reload' option.
Duane W.
Received on Fri Jan 16 2004 - 15:05:53 MST
This archive was generated by hypermail pre-2.1.9 : Sun Feb 01 2004 - 12:00:07 MST