On Fri, 2007-02-23 at 06:55 -0500, Tres Seaver wrote:
Roché Compaan wrote:
I'm curious, has anybody played around with the idea of caching ZCatalog results and if I submitted a patch to do this would it be excepted?
I quickly coded some basic caching of results on a volatile attribute and I was really surprised with the amount of cache hits I got (especially with a Plone site that is a heavy user of the catalog)
+1. I think using the 'ZCachable' stuff (e.g., adding a RAMCacheManager and associating a catalog to it) would be the sanest path here.
Cool idea. I haven't done any coding involving OFS.Cache though. Looking at it briefly it looks like one can modify the catalog to subclass OFS.Cacheable and then use the ZCacheable_get, ZCacheable_set and ZCacheable_invalidate methods to interact with a cache manager. This needs to be pretty explicit though. Are there any side effects that I should guard against if the catalog subclasses OFS.Cache? -- Roché Compaan Upfront Systems http://www.upfrontsystems.co.za