Terry Jones wrote at 2007-1-12 12:53 +0100:
> ...
>Briefly, I have a class that puts a volatile _v_xxx attribute on instances
>via a method called from its __init__ method. I make 4 instances of this
>class, and immediately assert(hasattr(instance, '_v_xxx')) on return. All
>these assertions succeed.
>A little later in my program though, another set of asserts shows that two
>of the four volatile attributes are gone.

The volatile attributes of an object disappear as soon as the the object
is flushed from the ZODB cache.

In principle, this can happen at any time.

However, the current ZODB implementation is quite conservative in
this respect. It flushes objects only at transaction or savepoint
boundaries and when explicitly told by the application.

For more information about ZODB, see the ZODB Wiki:

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

Reply via email to