[Zope3-dev] SQL method caching

Jim Fulton jim@zope.com
Fri, 16 Aug 2002 12:09:46 -0400


kapil thangavelu wrote:
> On Tuesday 13 August 2002 05:56 am, Erik Sabiun wrote:
> 
...

>>Now when we are convinced to make CacheManager for SQL's I have several
>>questions to ask about Zope3 implementation of it:
>>
>>   - How do you see implementation of this Manager? Should it be some kind
>>     of service or something else?
>>
> 
> i think service, but going by the strict definitions of utility and service, 
> it should be a utility, as applications will function without caching.
> 
> 
>>   - Where should the new interfaces (ICachable and ICacheManager we think)
>>     be put in Zope3 tree?
>>
> 
> good question. i think Zope.App is a good choice, although my methodology is 
> suspect ;-)
> 
> 
>>   - Maybe you can point us to some resources where we could find vision
>>     statements (if any) or general structure how it should be done in
>>     Zope3...
>>
> 
> there are none as it relates to z3
> 
> the original docs for it as a proposal for zope2 are still relevant, imo.
> 
> http://dev.zope.org/Wikis/DevSite/Projects/CacheManager/FrontPage

I agree, of course, it needs to be reinterpreted for Zope 3 .

I suggest that there should be a caching service. The service should
maintain multiple named caches corresponding to the Zope 2 cache managers.

I'm not sure what to do with Cacheable. It does two, or maybe three things:

- Tracks the cache manager id

- Provides a bunch of convenience methods

- Provides some undocumented meta-data needed by the cache manager (?).

I would definately move the convenience methods into the service.
The meta-data needed by the cache manager should be provided via an adapter.

I'm not sure how best to handle the setting and getting of the cache manager
id. Perhaps this should be handled via an adapter too, with an implementation
based on annotations.

> i just noticed we're not on the z3-dev list anymore, any objects to moving 
> this discussion back there?

I just did. :)

Jim

-- 
Jim Fulton           mailto:jim@zope.com       Python Powered!
CTO                  (888) 344-4332            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org