[Zope-DB] Re: Cache Controlled SQL methods (CCSQLMethod)
Dieter Maurer
dieter@handshake.de
Fri, 17 Jan 2003 20:23:48 +0100
Godefroid Chapelle wrote at 2003-1-17 12:18 +0100:
> I need to be able to flush cache for almost RO ZSQL methods.
>
> Searching the web brought me to Cache Controlled SQL methods (CCSQLMethod)
> http://www.dieter.handshake.de/pyprojects/zope/CCSQLMethod.html
>
> I saw that the product is quiet old.
>
> Does that mean that
>
> - it's robust enough that id did not need to be patched later and I can use
> it safely in production ?
It is still used in a production system.
HOWEVER: this is a Zope 2.1.6 installation, which means it is ancient.
I never tried to port it to newer Zope versions (because I switched
employer in between and did not have a need for cache controlled
Z SQL Methods in the mean time).
I expect, the only thing that might be needed are some security
declarations for the cache control API.
I think (though do not know for sure) that the underlaying base
module "SharedResource" is still used by some persons.
> - it's design was flawed enough that it is not used anywhere ?
You must not ask me ;-)
I made the design...
> or are there best ways to control ZSQL methods cache that came out later ?
I am meanwhile convinced that there is a ZODB method that allows
to invalidate all versions of an object in any cache (this would clear
the "_v_" variables that hold the cache).
I did not yet look what this method is, but I may do so soon,
because we currently face a non-deterministic session problem.
With high probability, it is caused by the manipulation of
deeply structured session data without telling the session,
that is was changed.
I plan to hunt this problem by forcing the session object from
the ZODB cache at the end of the request (transforming the
non-deterministic problem into a deterministic one).
In this endeavour, I will carefully study the ZODB and its cache
mechanism.
I will start with the ZODB documentation (--> Zope.org)
and, if not sufficient, go down into the sources.
Of course, you can do the same ...
> I am not tech savyy enough to evaluate myself :-(
Then, you may need to wait some time.
Or ask in the mailing list (best probably, the ZODB-dev mailing list).
Dieter