[Zope] Cachable objects
Andy McKay
andy@agmweb.ca
Mon, 24 Mar 2003 14:24:52 -0800
> 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