Hi, I'd like to be able to cache several objects of my Zope site in a RAM cache manager. My questions are : - how can I make a class "cachable" ? - is it the whole objects that are cached, or just the result of their called methods ? - when a cached object is modified, is there any way to refresh it in the cache ? - and any other important points about caching that I should take care of... Thanks, Thierry -- Linux every day, keeps Dr Watson away... http://gpc.sourceforge.net -- http://www.ulthar.net
Thierry FLORAC wrote at 2003-3-24 09:47 +0100:
I'd like to be able to cache several objects of my Zope site in a RAM cache manager. My questions are : - how can I make a class "cachable" ? - is it the whole objects that are cached, or just the result of their called methods ? - when a cached object is modified, is there any way to refresh it in the cache ? - and any other important points about caching that I should take care of...
RTDF: Read the "Cache Manager API" (--> embedded online help). Look at some examples, e.g. DTML Method and Python Script. Come back with more specific question where there remain some.... Dieter
I'd like to be able to cache several objects of my Zope site in a RAM cache manager. My questions are : - how can I make a class "cachable" ?
Inherit from Cachable. Take a look at DTML Methods for example.
- is it the whole objects that are cached, or just the result of their called methods ?
The result of it being called is cached. For example a pile of HTML usually is result of caching a DTML thing :)
- when a cached object is modified, is there any way to refresh it in the cache ?
Yes when you update the object, you call a particular method in Cachable to delete it. Again see examples in DTML Methods.
- and any other important points about caching that I should take care of...
Nah pretty simple actually ;) -- Andy McKay
participants (3)
-
Andy McKay -
Dieter Maurer -
Thierry FLORAC