[Zope-DB] ZSQL Caching
Andy McKay
andym@ActiveState.com
Wed, 31 Oct 2001 14:40:22 -0800
> Be careful:
>
> The cache is maintained in "_v_" attributes.
> These attributes are thread local. If you flush one in a given
> thread, this does not mean that the instances in the other
> threads are flushed, too. Instead, you cannot be sure
> that a different request does not get stale data...
Absolutely, its designed for debugging only rather than a serious
examination of the cache.
Cheers.
--
Andy McKay.
----- Original Message -----
From: "Dieter Maurer" <dieter@handshake.de>
To: "Andy McKay" <andym@ActiveState.com>
Cc: <zope-db@zope.org>
Sent: Wednesday, October 31, 2001 1:14 PM
Subject: Re: [Zope-DB] ZSQL Caching
> Andy McKay writes:
> > We were discussing ZSQL caching and work, and we wanted to debug the
> > contents of our cache, so I through together a quick method that cleans
up
> > the cache a little and adds a Cache tab. There you can see the contents
of
> > the cache and flush it.
> >
> > For quick debugging we found it quite useful.
> Be careful:
>
> The cache is maintained in "_v_" attributes.
> These attributes are thread local. If you flush one in a given
> thread, this does not mean that the instances in the other
> threads are flushed, too. Instead, you cannot be sure
> that a different request does not get stale data...
>
> This fact led me to the implementation of ZCCSQL methods
> (Cache Controlled SQL Methods). See
>
> <http://www.dieter.handshake.de/pyprojects/zope>
>
>
>
> Dieter
>