Implements file-based caching within the directory specified in
constructor.
|
|
|
add(self,
key,
value,
timeout=None,
invalidateGroup=None)
Adds data to cache, returning False if already cached. |
source code
|
|
|
|
|
set(self,
key,
value,
timeout=None,
invalidateGroup=None)
Adds data to cache, overwriting if already cached. |
source code
|
|
|
|
|
_delete(self,
fname)
Tries to delete the data at the specified absolute file path |
source code
|
|
|
|
|
_check_entry(self,
fname)
Verifies if a specific cache entry (provided as absolute file path)
is expired. |
source code
|
|
Boolean
|
|
int
|
_du(self)
Disk Usage count on the filesystem the cache is based at |
source code
|
|
Boolean
|
_full(self,
_on_retry=False)
Checks whether the cache is full, either because we have exceeded max
number of entries or the cache space is full. |
source code
|
|
|
_purge(self)
Iterate the whole cache structure searching and cleaning expired
entries. |
source code
|
|
|
_createdir(self)
Creates a directory for the root dir of the cache. |
source code
|
|
String
|
|
int
|
_get_num_entries(self)
Returns the number of files in the cache |
source code
|
|
int
|
_num_entries(self)
Returns the number of files in the cache |
source code
|
|
Inherited from object :
__delattr__ ,
__format__ ,
__getattribute__ ,
__hash__ ,
__new__ ,
__reduce__ ,
__reduce_ex__ ,
__repr__ ,
__setattr__ ,
__sizeof__ ,
__str__ ,
__subclasshook__
|