Cheetah :: CacheRegion :: CacheRegion :: Class CacheRegion
[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).

Nested Classes [hide private]
  _cacheItemClass
A CacheItem is a container storing:...
Instance Methods [hide private]
 
__init__(self, regionID, templateCacheIdPrefix='', cacheStore=None)
 
clear(self)
drop all the caches stored in this cache region
 
getCacheItem(self, cacheItemID)
Lazy access to a cacheItem
 
isNew(self)
Method Details [hide private]

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.