Skip to main content

memory

ModuleSource

The caches implemented by the data exchanges in the memory. Since the data is maintained in the memory. A very large file (for example, a file exceeding the size of the memory) may cause such caches to fail.

A good thing is that such caches can be used for storing any kinds of data. Note that sharing data among processes needs the data to support pickle.

This module provides two implementations:

  1. CachePlain: Share data within the same process. It will not work if the background callbacks are used.
  2. CacheQueue: Share data based on a queue shared by multiple processes. It can work among threads or processes. Therefore, it is compatible with the background callbacks.

Classes

Member
Description
CachePlainThe plain implementation of the cache.
CacheQueueThe cache implementation based on process-sharable Queue().
CacheQueueMirrorThe process-compatible instance of CacheQueue.