Hi,

I'm hoping someone can answer a simple question about the zodb cache settings that are shown in the control panel of the ZMI under zope. In summary, I'm trying to understand a bit more about how zodb loads objects into memory, so I can make sure that objects I need aren't being evicted from the cache unnecessarily.

In my database, I have a zope folder (it's not a btree folder) so items in the folder are stored as attributes, and the ids of the items as a list. In the folder I have 10 subfolders. Each subfolder contains one simple object, again, stored as an attribute.

The folder, the subfolders and the objects all have an attributes which is a DateTime object. They also all have a single string attribute which is the title.

Now, if I access say, the title attribute of the top folder, the entire folder object is loaded into memory. Am I correct that the subfolder objects (attributes of the folder) are not loaded in at this point, just references to them? Does the same apply to the DateTime objects which are attributes of this folder?

At this point, how many objects would the cache show as needed to be loaded?

Assuming that I access the datetime attribute when I load the folder, could I avoid evicting objects from the cache by storing dates as strings rather than DateTimes, so I load one large object rather than two?

Also, am I right that the cache size is determined by total number of objects, rather than by cache size? So loading a large file in, for example, would not evict tons of objects to make room for it.

Thanks in advance for any help,

Miles



_______________________________________________
For more information about ZODB, see the ZODB Wiki:
http://www.zope.org/Wikis/ZODB/

ZODB-Dev mailing list  -  ZODB-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zodb-dev

Reply via email to