Entropy asynchronous and synchronous cache writer and reader. This
class is a Singleton and contains a thread doing the cache writes
asynchronously, thus it must be stopped before your application is
terminated calling the stop() method.
|
|
|
|
|
|
|
|
start(self)
This is the method used to start the asynchronous cache writer but
also the whole cacher. |
source code
|
|
|
|
|
|
|
stop(self)
This method stops the execution of the cacher, which won't accept
cache writes anymore. |
source code
|
|
|
|
sync(self,
wait=False)
This method can be called anytime and forces the instance to flush
all the cache writes queued to disk. |
source code
|
|
|
|
|
|
None
|
push(self,
key,
data,
async=True)
This is the place where data is either added to the write queue or
written to disk (if async == False) only and only if start() method
has been called. |
source code
|
|
|
Python object
|
pop(self,
key)
This is the place where data is retrieved from cache. |
source code
|
|
|
Inherited from core.Singleton:
is_destroyed,
is_singleton
Inherited from object:
__delattr__,
__getattribute__,
__hash__,
__init__,
__reduce__,
__reduce_ex__,
__repr__,
__setattr__,
__str__
|