[Zope] caching and Squid (was Urgent help needed: Zope falls over under moderate load)

Chris McDonough chrism@zope.com
Tue, 20 Nov 2001 21:10:26 -0500


> butting in with questions :)
> with 2.3.x, RAM Cache Manager has no refresh/expire/max_age feature.
you get
> that with 2.4.x and above only.  so that might give users stale
pages.  i
> know, i've encountered it.

Didn't someone make a RAM Cache Manager with a max age thing?  I swear
I remember seeing it posted on Zope.org.

> i *really* think that there should be a RAM Cache Manager howto/best
> approach.  i'd like to write it, but i need inormation.  i'm
currently
> caching my pages, but i'm not sure i'm doing it right.  properties
such as
> REQUEST variables (there's two forms available. 1- at the method's
page, 2-at
> the cachemanager page), statistics (seems that the url does have
some effect
> on the cache hit rates), etc.  confirmation from product author/zc
would
> really help.  i guess that i should really look at the source ...,
and i
> will.  today.

The nuances of the cache manager baffle me as well, and I'll need to
defer mostly to Shane, but I *think* that at least for the RAM cache
the REQUEST variables listed are used as part of the key into the big
"cache dict" where things are held.

This means that, if, for example, you've got AUTHENTICATED_USER as a
request variable, if the AUTHENTICATED_USER is "fred" when you cache
one page, another user "bob" won't see fred's cached page (which might
contain his name).  However you *will* still be able to cache the page
for fred.. the next time you ask for the page, a customized "fred"
version will be served from cache.  The more variables that are
different and listed, the more RAM will be consumed for slightly
different versions of the same page.

> now, for putting squid in front of zope.  how do others do this,
when you > have more than one server (using zeo).  there's the virtual
parameter in
> squid, but i don't get it.  any body done this?

There was recently a Zope-maillist posting by Sebas ICK that quoted
Richard Barrett which goes in to some speculative detail about using
Squid to front end for multiple Zopes.  If it's accurate, it should
really be cleaned up and turned into a howto.

> my solution for now is putting in caching manager, and if *really*
necessary
> adding in another zeo client.

I'd consider something like Squid to do the job of taking the load off
your servers.  It's a learning experience, but probably worth it for a
site like yours.

- C