[ZODB-Dev] [Proposal] Size controlled ZODB cache

Jim Fulton jim at zope.com
Thu Jun 2 16:08:01 EDT 2005

Shane Hathaway wrote:
> Dieter Maurer wrote:
>>Currently, the ZODB cache can only be controlled via the maximal number
>>of objects. This makes configuration complex as the actual limiting
>>factor is the amount of available RAM and it is very difficult to
>>estimate the size of the objects in the cache.
>>I therefore propose the implementation of cache replacement policies
>>based on the estimated size of its objects.
> +1 on this proposal.  Ideally, it should be possible to tell ZODB to use
> either cPickleCache, your size controlled cache, or some other cache
> implementation, upon opening the database.

Agreed.  This will, however, require a highly desireable
but major refactoring to surgically separate the persistence and
persistent cache implementations which are currently joined at the
hip. :)

(Note that Python 2.4 actually grew a feature, subclassing of
  weakrefs to facilitate this refactoring.)


Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org

More information about the ZODB-Dev mailing list