Home | Trees | Indices | Help |
|
---|
|
object --+ | CacheAbstract
Abstract class for cache implementations. Main function is now to provide referenced api documentation.
Use CacheInRam or CacheOnDisk instead which are derived from this class.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
cache_stats_name =
|
|
|||
Inherited from |
|
Paremeters ---------- request: the global request object
|
Tries retrieve the value corresponding to `key` from the cache of the object exists and if it did not expire, else it called the function `f` and stores the output in the cache corresponding to `key`. In the case the output of the function is returned. :param key: the key of the object to be store or retrieved :param f: the function, whose output is to be cached :param time_expire: expiration of the cache in microseconds - `time_expire` is used to compare the current time with the time when the requested object was last saved in cache. It does not affect future requests. - Setting `time_expire` to 0 or negative value forces the cache to refresh. If the function `f` is `None` the cache is cleared. |
Clears the cache of all keys that match the provided regular expression. If no regular expression is provided, it clears all entries in cache. Parameters ---------- regex: if provided, only keys matching the regex will be cleared. Otherwise all keys are cleared. |
Increments the cached value for the given key by the amount in value Parameters ---------- key: key for the cached object to be incremeneted value: amount of the increment (defaults to 1, can be negative) |
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Wed Feb 3 10:53:18 2010 | http://epydoc.sourceforge.net |