[ZODB-Dev] what's the latest on zodb/zeo+memcached?

Jim Fulton jim at zope.com
Tue Jan 15 19:40:28 UTC 2013


So, first, a concise partial answer to a previous question:

ZODB provides an in-memory object cache.  This is non-persistent.
If you restart, it is lost.  There is a cache per connection and the
cache size is limited by both object count and total object size (as
estimated by database record size).

ZEO also provides a disk-based cache of database records read
from the server.  This is normally much larger than the in-memory cache.
It can be configured to be persistent.  If you're using blobs, then there
is a separate blob cache.

On Tue, Jan 15, 2013 at 2:15 PM, Claudiu Saftoiu <csaftoiu at gmail.com> wrote:
>> You can't cause a specific object (or collection of objects) to stay
>> ion the cache, but if you're working set is small enough to fit in
>> the memory or client cache, you can get the same effect.
>
>
> That makes sense. So, is there any way to give ZODB a Persistent and tell it
> "load everything about the object now for this transaction" so  that the
> cache mechanism then gets triggered, or do I have to do a custom search
> through every aspect of the object, touching all Persistents it touches,
> etc, in order to get everything loaded? Essentially, when  the server
> restarts, I'd like to pre-load all these objects (my cache is indeed big
> enough), so that if a few hours later someone makes a request that uses it,
> the objects will already be cached instead of starting to be cached right
> then.

ZODB doesn't provide any pre-warming facility.  This would be
application dependent.

You're probably better off using a persistent ZEO cache
and letting the cache fill with objects you actually use.

Jim

-- 
Jim Fulton
http://www.linkedin.com/in/jimfulton
Jerky is better than bacon! http://zo.pe/Kqm


More information about the ZODB-Dev mailing list