Cache Controlled SQL methods (CCSQLMethods)

1 Description

Z SQL methods provide a caching mechanism that can greatly reduce the number of database accesses.

If, however, the database is changed dynamically, the cache must be used with caution as otherwise stale query results may be returned.

Cache controled SQL methods (CCSQLMethods) are derived from Z SQL methods. In addition to the normal Z SQL methods, a cache controlled SQL method implements the functions flushCache() and flushCacheEntry(REQUEST=None, **kw). flushCache flushes the complete cache associated with the method. flushCacheEntry flushes the query specified by its arguments. The query is determined in the same way as in __call__. This allows explicit cache control and allows for much better cache utilization.

Note that flushCache works reliably across multiple ZEO client processes while flushCacheEntry takes effect only in a single process.

Cache controled SQL methods are also available as an CMF FSZSQLMethod derivative. They are registered with the filename extension ccsql.

2 News

2.1 Version 1.0

made Zope 2.8 compatible.

2.2 New in version 0.3

2.3 New in version 0.2

3 Download

The current version 2.x (for Zope 2.11) can be downloaded or "easy-installed" from the Python Package index.

The older CCSQLMethods version 1.0 (for Zope 2.7 to Zope 2.10) can be downloaded as a TGZ archiv. It should be extracted in a Products directory.

The package SharedResource is required and must be downloaded and installed, too.

Dieter Maurer