[Zope-dev] _p_deactivate() and _v_ variables?

Florent Guillaume fg at nuxeo.com
Tue Oct 21 08:19:39 EDT 2003


ChrisW wrote:
> Seb Bacon wrote:
> > > Agreed. Are there any situations, apart from the already discussed CMF
> > > skindata, where this currently isn't the case?
> >
> > I'm a bit puzzled - of what use is a variable which may disappear "at
> > any random time"?
>
> For caching things...

Note that caching things in _v_ attributes can be a complex business. In
many cases, there is some situation where the cache has to be
invalidated, be it at REQUEST boundary or at a different time. And this
can be difficult to do correctly, see the hoops I had to go through in
CMFCore.MemberDataTool regarding _v_temps and the need for it to be
cleaned at the end of the request (using REQUEST._hold).

I'm sure this is needed for lots of cases and isn't actually
implemented. I know at one point LDAPUserFolder had such caching of its
entries, I haven't looked at it in a while.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:fg at nuxeo.com



More information about the Zope-Dev mailing list