turtle_quant_1.strategies.helpers.multiprocessing¶
turtle_quant_1.strategies.helpers.multiprocessing
¶
BaseCache
¶
FileCache
¶
Process-safe cache using file-based storage with proper locking.
Initialize the cache with a directory for storage.
Source code in src/turtle_quant_1/strategies/helpers/multiprocessing.py
contains
¶
Check if a key exists in the cache.
Source code in src/turtle_quant_1/strategies/helpers/multiprocessing.py
get
¶
Get a value from the cache.
Source code in src/turtle_quant_1/strategies/helpers/multiprocessing.py
set
¶
Set a value in the cache.
Source code in src/turtle_quant_1/strategies/helpers/multiprocessing.py
SharedMemoryCache
¶
Bases: BaseCache
A dict-like cache using shared_memory + serialization.
:param size_mb: Number of bytes to allocate for shared memory. :param name: Optional name of existing shared memory block (to attach). :param lock: Optional Lock for synchronization. A new one will be created if None.