[ZODB-Dev] Using Ape to map zclass property sheets

Shane Hathaway shane at zope.com
Wed May 14 16:27:59 EDT 2003


Rocky Burt wrote:
> I need to cache some information (such as the result of determining
> whether or not certain tables exist).  But I also need to allow the
> flushing of the cache (which I wanted to do through the ZMI).
> 
> I was intending on caching this information in root_mapper and then
> having a controller object of sorts empty that cache when the admin
> requests it (through the zmi).  But I realized it doesn't appear that
> there's anyway to get a dbtab's mount point root_mapper instance.  Am I
> correct in assuming that its not possible to get that root_mapper?

I'm a little confused by the question.  DBTab knows nothing about mappers.

> Maybe you could suggest a more appropriate place to cache that
> information? (I like keeping it with the dbtab mount point as it seems
> to me to be most appropriate).

The information you want to cache is on the gateway side, isn't it?  If 
it is, theoretically DBTab doesn't exist on the gateway side.  Imagine 
the gateways working entirely inside a ZEO server.  DBTab only exists on 
the clients.

FWIW, I've been thinking about adding some kind of per-gateway cache on 
the gateway side.  Right now, the SQL gateways are not static.  They 
reconfigure themselves depending on what database they are attached to. 
  Filesystem gateways, OTOH, are completely static (in CVS.)  I'd like 
both kinds of gateways to be static.

I sounds like if we had a per-gateway cache, and a way were provided for 
clearing the cache for all gateways at once, you'd be able to use it for 
your purposes.

Shane




More information about the ZODB-Dev mailing list