[Zope-DB] Controlling Z SQL caching
ianb at colorstudy.com
Tue Feb 24 17:12:01 EST 2004
I've decided that I definitely need some caching in a database-driven
application I'm working on, but I need to be able to invalidate the
cache on a query. I don't see any way to do that with Z SQL methods.
It would be ideal if I could just pass an extra keyword argument in
(like nocache__=1), and it would get rid of any caches on that query.
This looks like a really easy change to make in DA._cached_result (and
__call__, to pass the argument through). But it doesn't seem like I
should have to patch Zope for something so basic. Is there another
technique that I'm missing?
Actually, I'm not really sure if turning off caching for a specific
query will work... maybe purging the entire cache for a query would be
better. But there doesn't seem to be an interface for that either.
Thanks for any ideas...
More information about the Zope-DB