[Zope-dev] RAMCacheManager and object size

Shane Hathaway shane at hathawaymix.org
Sun Jul 10 11:32:29 EDT 2005


Sidnei da Silva wrote:
> On Sun, Jul 10, 2005 at 12:18:03AM -0600, Shane Hathaway wrote:
> | Catalog results in particular are an obvious thing to cache, but they
> | aren't safe for caching because they link back to the catalog.  You'd
> | have major thread problems and probably inconsistent results.
> 
> Would using thread.local help here?

I don't think so.  You want either a shared cache (like RAMCacheManager)
or a per-database-connection cache (which would let you cache catalog
results.)  Database connections are not bound to a specific thread.

However, you might be on to something: a switch that turns
RAMCacheManager into a per-database-connection cache would be useful for
things that currently aren't cacheable.

Shane


More information about the Zope-Dev mailing list