[Zope] ZODB Caching Questions

Martin Gfeller martin.gfeller@comit.ch
Mon, 1 Oct 2001 19:38:39 +0200


Dear ZOPE experts,

I have some (newbie) questions on ZODB and its caching mechanism:

We're using a number of ZODBs to store financial deal objects 
and assorted static data objects. 

A reference to each object in a database is kept in a 'root' object,
which is a PersistentMapping.

1. If objects are referenced from a root object, they can never
   be deallocated, because at least one reference is always kept.
   Is this so, and what are alternative ways to do it?

2. If an object is a simple Python object, instead of being derived
   from Persistent, cache control never seems to touch it.
   Is this correct?

3. If I change our code so that the class is now derived from Persistent,
   I cannot load the existing objects that were saved before. Is there
   any simple workaround for this?

4. The cache statistics cache_mean_deal and cache_mean_deac never
   seem to show anything else than 0.0, despite tracing shows that 
   deactiviations occur.

Any hints appreciated.

Best regards,
Martin Gfeller, mailto:martin.gfeller@comit.ch,  +41 1 298 9284
COMIT Gruppe, http://www.comit.ch
Risk Advice Services, http://www.quantax.com