agora.io.utils.Cache¶
- class Cache(max_len=5000, load_fn=<function imread>)[source]¶
Bases:
object
Fixed-length mapping to use as a cache. Deletes items in FIFO manner when maximum allowed length is reached.
Methods
clear
load_item
- Parameters
max_len – Maximum number of items in the cache.
load_fn (
Callable
) – The function used to load new items if they are not
available in the Cache
Methods
clear
load_item
- __init__(max_len=5000, load_fn=<function imread>)[source]¶
- Parameters
max_len – Maximum number of items in the cache.
load_fn (
Callable
) – The function used to load new items if they are not
available in the Cache
Methods
__init__
([max_len, load_fn])- param max_len
Maximum number of items in the cache.
clear
()load_item
(item)