You are not logged in Log in Join
You are here: Home » Members » itamar » ZCache

Log in
Name

Password

 
 

Folder icon ZCache

I've stopped working on this. Instead I'm working on GenericCache, which is a lot more extensible. OTOH GenericCache isn't usable yet.

A simple cache object. Add a ZCache object in the same folder as the method you want to cache, and enter the method's id as the method the ZCache should cache.

The delay property sets the minimum time between updates of the cache, in seconds. The cache will reload the method whose path you listed in cacheObjectPath if you access the cache more than delay seconds since the cache was last updated.

You can use the update method to force an update of the cache.

Install ZCache by unpacking the tgz in your Zope folder and making sure you have a folder called "ZCache" (without quotes) folder in var/.

ZCache 0.4 is incompatible with previous versions - you'll have to recreate all your old ZCache instances.

As of version 0.4 ZCache only supports Unix since it uses fcntl for file locking. Patches to fix this are welcome.

New in 0.4:

  • The cache is stored in the filesystem (in var/ZCache) instead of in the ZODB.
  • ZCache generates Expires, Etag and Last-Modified headers for HTTP caching. Last-Modified now behaves correctly (on Unix at least).
  • The cached method is looked up using its absolute path, e.g. /QuickStart/index_html or /Folder/Another Folder/cacheme.

ZCache uses code written by Digital Creatins for use in Zope. I'll add the correct phrase as per ZPL later today.

 Title   Type   Size   Modified   Status 
 0.1 Edit object Software Release   1999-11-15 published
 0.2 Edit object Software Release   1999-11-16 published
 0.3 Edit object Software Release   1999-12-14 published
 0.4 Edit object Software Release   1999-12-14 published