[PEAK] The path of model and storage

Robert Brewer fumanchu at amor.org
Wed Jul 28 14:00:45 EDT 2004

Phillip J. Eby wrote:
> >* Keys can have an estimated multiplicity, which may be 1 or 
> higher.  (1 
> >means unique, values higher than 1 are an estimate which may 
> be used to 
> >drive caching rules)
> Clarification: this is to support caching of certain types of 
> queries.  But, given that the vast majority of the system's 
> functionality 
> depends on unique keys, this should probably be simplified to 
> deal only in 
> unique keys for now.  We can always add support for 
> non-unique keys and 
> indexes later.

And if, in the process, you decided to make a cache container which:

1. Accepts any Python object (i.e. - don't have to subclass from
2. Is thread-safe: avoiding "dict mutated while iterating" (probably
with a page-locking btree),
3. Indexes on arbitrary keys, which are simple attributes of the cached
objects (both unique and non-), and
4. Is no more than 4 times as slow as a native dict,

...I'd (wash your car | walk your dog | do your taxes) for a year. :)

Robert Brewer
Amor Ministries
fumanchu at amor.org

More information about the PEAK mailing list