On Tue, Jan 15, 2013 at 2:40 PM, Jim Fulton <j...@zope.com> wrote:

> 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 <csaft...@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.

Okay, that makes sense. Would that be a server-side cache, or a client-side
cache? I believe I've already succeeded in getting a client-side persistent
disk-based cache to work (my zodb_indexdb_uri is
but this doesn't seem to be what you're referring to as that is exactly the
same size as the in-memory cache. Could you provide some pointers as to how
to get a persistent disk-based cache on the ZEO server, if that is what you
meant? It seems ZODB/ZEO  really lacks for centralized documentation.

- Claudiu
For more information about ZODB, see http://zodb.org/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org

Reply via email to