Package Cheetah :: Module CacheRegion :: Class CacheRegion
[show private | hide private]
[frames | no frames]

Class CacheRegion


A CacheRegion stores some CacheItem instances.

This implementation stores the data in the memory of the current process. If you need a more advanced data store, create a cacheStore class that works with Cheetah's CacheStore protocol and provide it as the cacheStore argument to __init__. For example you could use Cheetah.CacheStore.MemcachedCacheStore, a wrapper around the Python memcached API (http://www.danga.com/memcached).


Method Summary
  __init__(self, regionID, templateCacheIdPrefix, cacheStore)
  clear(self)
drop all the caches stored in this cache region
  getCacheItem(self, cacheItemID)
Lazy access to a cacheItem
  isNew(self)

Class Variable Summary
classobj _cacheItemClass = Cheetah.CacheRegion.CacheItem

Method Details

clear(self)

drop all the caches stored in this cache region

getCacheItem(self, cacheItemID)

Lazy access to a cacheItem

Try to find a cache in the stored caches. If it doesn't exist, it's created.

Returns a CacheItem instance.


Generated by Epydoc 2.1 on Sat Mar 4 13:36:24 2006 http://epydoc.sf.net