[Zope-CMF] Zope, CMF, Plone, Squid, Apache and Caching

Hardy, Matthew mphardy@engin.umich.edu
Thu, 10 Jul 2003 14:22:17 -0400


This is a multi-part message in MIME format.

------_=_NextPart_001_01C34710.31933EBC
Content-Type: text/plain;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

Hello,

I have been trying to piece together the various caching solutions used =
with Zope over the past few weeks and have come across some =
inconsistancies I can't explain without a broader sense of how all the =
code work together.  I'm hoping someone with a deeper knowledge of how =
things work could explain the following or at least point me in the =
right direction.

1) CMF Caching Policy Manager works on *some* objects but not all.

I am currently using CMF Caching Policy Manager to prevent pages viewed =
by authenticated users from being picked up by Squid.  This would be a =
security issue since the same URL might provide different information =
for anonymous and authenticated users.

So I have two policies, one with a predicate: "python:member!=3DNone" =
with no-cache checked and another policy with predicate: =
"python:member=3D=3DNone" with no-cache unchecked and a max-age set.  =
This seems to work, however I can't get CMF Caching Policy Manager to =
add any headers to images.  Images are sent with nothing more than a =
Last-Modified header which does get it cached but i'd like to have more =
control.

2) Http Accelerator can't associate with anything in a Plone Site.

If you get the list of everything http_accelerator can associate with in =
its Associate tab nothing in a Plone Site object shows up.  Since i'm =
using Squid I would like the PURGE ICP functionality to operate as it is =
intended but nothing of use is in the list of associatable objects.

3) Ram Cache Manager can't associate with anything in a Plone Site.

The same problem I have with Http Accelerator carries over to the Ram =
Cache Manager when you try to associate objects to it.  In the Plone =
Book "Slot caching" is discussed using the RAM Cache Manager but if you =
can't associate it with any objects in Plone I don't see how this would =
work.



I have spent considerable effort on this project and have made some good =
progress.  I am documenting it all on my wiki:  =
http://matthardy.us/mywiki/HighPerformanceZope

I have gotten most of the issues worked out but this caching stuff is a =
real pain to understand if you don't know exactly what happens during =
each request and how CMF/Plone interact with Zope.  Once I get this all =
working I plan on polishing it up and adding it as a HowTo to Zope.org's =
literary collection.


Thanks in advance for any help you can furnish.


Matt Hardy
mphardy@umich.edu

------_=_NextPart_001_01C34710.31933EBC
Content-Type: text/html;
	charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DWindows-1252">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
6.0.6396.0">
<TITLE>Zope, CMF, Plone, Squid, Apache and Caching</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->

<P><FONT SIZE=3D2>Hello,<BR>
<BR>
I have been trying to piece together the various caching solutions used =
with Zope over the past few weeks and have come across some =
inconsistancies I can't explain without a broader sense of how all the =
code work together.&nbsp; I'm hoping someone with a deeper knowledge of =
how things work could explain the following or at least point me in the =
right direction.<BR>
<BR>
1) CMF Caching Policy Manager works on *some* objects but not all.<BR>
<BR>
I am currently using CMF Caching Policy Manager to prevent pages viewed =
by authenticated users from being picked up by Squid.&nbsp; This would =
be a security issue since the same URL might provide different =
information for anonymous and authenticated users.<BR>
<BR>
So I have two policies, one with a predicate: =
&quot;python:member!=3DNone&quot; with no-cache checked and another =
policy with predicate: &quot;python:member=3D=3DNone&quot; with no-cache =
unchecked and a max-age set.&nbsp; This seems to work, however I can't =
get CMF Caching Policy Manager to add any headers to images.&nbsp; =
Images are sent with nothing more than a Last-Modified header which does =
get it cached but i'd like to have more control.<BR>
<BR>
2) Http Accelerator can't associate with anything in a Plone Site.<BR>
<BR>
If you get the list of everything http_accelerator can associate with in =
its Associate tab nothing in a Plone Site object shows up.&nbsp; Since =
i'm using Squid I would like the PURGE ICP functionality to operate as =
it is intended but nothing of use is in the list of associatable =
objects.<BR>
<BR>
3) Ram Cache Manager can't associate with anything in a Plone Site.<BR>
<BR>
The same problem I have with Http Accelerator carries over to the Ram =
Cache Manager when you try to associate objects to it.&nbsp; In the =
Plone Book &quot;Slot caching&quot; is discussed using the RAM Cache =
Manager but if you can't associate it with any objects in Plone I don't =
see how this would work.<BR>
<BR>
<BR>
<BR>
I have spent considerable effort on this project and have made some good =
progress.&nbsp; I am documenting it all on my wiki:&nbsp; <A =
HREF=3D"http://matthardy.us/mywiki/HighPerformanceZope">http://matthardy.=
us/mywiki/HighPerformanceZope</A><BR>
<BR>
I have gotten most of the issues worked out but this caching stuff is a =
real pain to understand if you don't know exactly what happens during =
each request and how CMF/Plone interact with Zope.&nbsp; Once I get this =
all working I plan on polishing it up and adding it as a HowTo to =
Zope.org's literary collection.<BR>
<BR>
<BR>
Thanks in advance for any help you can furnish.<BR>
<BR>
<BR>
Matt Hardy<BR>
mphardy@umich.edu</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C34710.31933EBC--