[Zope-DB] ZSQL Caching
Dieter Maurer
dieter@handshake.de
Wed, 31 Oct 2001 22:14:40 +0100
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