[Zope] Clearing _v_ attributes

Pascal Peregrina Pperegrina at Lastminute.com
Wed Jan 19 09:29:06 EST 2005


Pointers about what ?

If you mean about "And your ZODB grows everytime you want to flush the
cache..." :
Andrew is just saying that changing a persistent attribute of an object will
led to storing a new version of the object in the ZODB.

If you mean about "why I was asking how to clear _v_ attributes" :
I am using CMF 1.5.0 and SpeedPack 0.3, which monkey patches 2 CMF classes
to speed up skinned objects lookup by caching the result of previous lookups
in a new _v_ attribute on "CMF Site" objects. The performance increase is
huge (if you have lots of skins defined, and lots of folders for each skin
to be traversed). However, the situations that SpeePack "catches" to decide
to clear the _v_ attribute data are not enough for my needs. I need a way to
make sure that data is flushed in all connections.

Hope this answer your question.

Pascal

-----Message d'origine-----
De : zope-bounces at zope.org [mailto:zope-bounces at zope.org]De la part de
Marco Bizzarri
Envoyé : mercredi 19 janvier 2005 14:27
À : Andrew Milton
Cc : zope at zope.org
Objet : Re: [Zope] Clearing _v_ attributes


Andrew Milton wrote:
> +-------[ Toby Dickenson ]----------------------
> | On Wednesday 19 January 2005 11:51, Andrew Milton wrote:
> | > +-------[ Pascal Peregrina ]----------------------
> | > | If I do a clearCaches() method that clears _v_ attributes on the
object, 
> | how
> | > | can I make sure it will clear these attributes in all the Zope
connections
> | > | that may have a cached copy of the object ?
> | > 
> | > Basically you can't. 
> | 
> | There is one very obvious way.... change a non-_v_ attribute of the
object and 
> | commit it. Every other connection with an instance of that object in
memory 
> | will lose the _v_ attribute at its next transaction boundary.
> 
> And your ZODB grows everytime you want to flush the cache...
> 

Could you please further detail the reason of the above (or provide 
pointers on this?)

Regards
Marco
_______________________________________________
Zope maillist  -  Zope at zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


**********************************************************************
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 Zope mailing list