An abstract, multi-threaded cache object.
|
|
|
__setitem__(self,
name,
value)
Populates the cache with a given name and value. |
source code
|
|
|
__getitem__(self,
name)
Gets a value from the cache, builds it if required. |
source code
|
|
|
|
|
|
|
|
|
mru(self)
Returns the Most Recently Used key |
source code
|
|
|
lru(self)
Returns the Least Recently Used key |
source code
|
|
|
key(self,
name)
Override this method to extract a key from the name passed to the []
operator |
source code
|
|
|
commit(self)
Override this method if you want to do something each time the
underlying dictionary is modified (e.g. |
source code
|
|
|
|
|
check(self,
key,
name,
entry)
Override this method to check whether the entry with the given name
is stale. |
source code
|
|
|
build(self,
key,
name,
opened,
entry)
Build the cached value with the given name from the given opened
resource. |
source code
|
|
|
|
|
|
|
_pack(self,
entry,
value)
Store the value in the entry. |
source code
|
|
|
_unpack(self,
entry)
Recover the value from the entry, returns NOT_INITIALIZED if it is
not OK. |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|