Module async_lru_cache

Source
Expand description

Provides a least-recently-used cache with async access.

To operate, this cache is bound to an I/O back-end object that provides the loading and flushing of cache entries.

The cache holds map.write() during eviction I/O, so cross-cache flush dependencies (e.g. โ€œflush cache B before evicting from cache Aโ€) must be handled externally (see e.g. qcow2โ€™s MetadataCaches).

Structsยง

AsyncLruCache ๐Ÿ”’
Least-recently-used cache with async access.
AsyncLruCacheEntry ๐Ÿ”’
Cache entry structure, wrapping the cached object.
AsyncLruCacheInner ๐Ÿ”’
Least-recently-used cache with async access.

Traitsยง

AsyncLruCacheBackend ๐Ÿ”’
Provides loading and flushing for cache entries.