[Zope-PAS] RFC: PAS caching
jens at dataflake.org
Fri Oct 8 05:40:55 EDT 2004
I'm going to work on caching for PAS and have thought about a couple
different architectural models to do so. I've come to a model I
personally like and wouldn't mind some comments.
Basically, I am proposing an architecture that works a little bit like
ZCacheable in that you instantiate cache managers and associate objects
(in this case plugins) with them. Obviously there are only a few plugin
types where it makes sense to cache anything. Since the "cacheable"
plugins have varying interfaces there would be specific cache manager
objects for each of them, and only the appropriate plugin can be
associated with them.
The plugins would cache based on keys that reflect the arguments to the
given method that is used to retrieve data and allow to set parameters
such as cache duration and knobs to invalidate the cache.
The caches require some cooperation from the plugins so that the
methods that provide cacheable data would try to locate and consult an
appropriate cache first, just like index_html in some basic OFS types
now consults ZCache_get before computing a result. The interfaces
itself would not be affected, just the implementations (which I would
handle myself, too).
What do you think?
Jens Vagelpohl jens at zetwork.com
Software Engineer Zope - done medium rare
Zetwork GmbH http://www.zetwork.com/
More information about the Zope-PAS