On Fri, Jun 20, 2008 at 02:01:52PM +0200, Martijn Faassen wrote: > Hi there, > > Brian Sutherland wrote: > [snip] >> Also for this problem: >> >> # XXX what happens if EngineFactory were to be evicted from the ZODB >> # cache? >> def getCached(self): >> return getattr(self, '_v_engine', None) >> >> I think you could use the same mechanism found in zope.app.cache.ram. >> I.e. store the engines in a module level global dictionary. Then use >> some clever way (with a counter and time) to figure out a unique key for >> your local utility (and persistently store the key). > > Ah, thanks for that tip. Does zope.app.cache.ram deal with threading > issues? Ah, yes, I see it uses a lock. Anyway, a patch would be welcome. :)
Committed, please feel free to revert or modify as you feel:) > > Regards, > > Martijn > > _______________________________________________ > Zope-Dev maillist - Zope-Dev@zope.org > http://mail.zope.org/mailman/listinfo/zope-dev > ** No cross posts or HTML encoding! ** > (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce > http://mail.zope.org/mailman/listinfo/zope ) -- Brian Sutherland _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )