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 <[email protected]> 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 _______________________________________________ For more information about ZODB, see http://zodb.org/ ZODB-Dev mailing list - [email protected] https://mail.zope.org/mailman/listinfo/zodb-dev
