pyphi.cache.cache_utils#

Common utilities for caching.

Functions

entry_weight(value)

Estimated bytes one cached value occupies, including its key and slot.

memory_full()

Check if the memory is too full for further caching.

memory_limit_bytes()

Resident memory this process may use.

Classes

ByteBoundedStore()

A dict that holds its byte weight steady once memory reaches the ceiling.