[ZODB-Dev] Getting an up to date instance of a persistent object

Pascal Peregrina Pperegrina at Lastminute.com
Wed May 24 04:57:09 EDT 2006


Hi,

I have a question regarding what triggers the reloading of an object
state from ZODB (in order to set the most up to date one).

(note that I use ZEO)

Say you have C1, a Connection, and you have already retrieved object O1
(so O1 is in C1 cache).
Then, O1 is modified by something (that uses a different Connection).

When you reuse C1 and access O1, I would like to know what makes sure
the O1 state is up to date.

Apparently, accessing O1._p_serial before anything else returns the old
serial (so the latest state has not been set). I also tried C1.sync()
(through O1._p_jar) before accessing O1._p_serial but I got same result.

And apparently, accessing O1._p_mitme before anything else does return
the latest mtime and then accessing O1._p_serial does return the latest
serial (so the latest state has been set)

Is that right? What's the rule?

Thanks for your help.

Pascal


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************


More information about the ZODB-Dev mailing list