CacheQueue.CacheQueueMirror
ClassSource
cache: CacheQueue[Info, Data]
cache_mirror: CacheQueue.CacheQueueMirror[Info, Data] = cache.mirror
The process-compatible instance of CacheQueue
.
Most functionalities of this mirror object are disabled. It only provides the
dump()
method for allowing the sub-process send the data to the cache in
the main process.
danger
Users should not initialize this mirror object by using
from dash_file_cache.caches.memory import CacheQueue
CacheQueue.CacheQueueMirror(...)
In other words, the instances of CacheQueueMirror
should be always acquired by the
property CacheQueue().mirror
.
Methods
dump
cache.dump(key: str, info: Info, data: Data)
Dump data to the cache.
Requires
Argument | Type | Required | |
---|---|---|---|
key | str | The key value of this new data. If the key exists in the cache, will replace the original value. | |
info | Info | The light-weighted metadata to be dumped into the cache. | |
data | Data | The data to be dumped into the cache. |