LRUCache#
- class caput.util.arraytools.LRUCache(size_bytes: int)[source]#
Bases:
cachetools.LRUCacheAn LRU cache for numpy arrays that will expand to a maximum size in bytes.
This should be used like a dictionary except that the least recently used entries are evicted to restrict memory usage to the specified maximum.
- Parameters:
- size_bytes
int The maximum size of the cache in bytes.
- size_bytes