class documentation
class ACMELRUCache(cachetools.LRUCache):
Constructor: ACMELRUCache(maxsize, getsizeof, evict)
An improved version of the LRUCache from cachetools with an eviction callback.
| Method | __init__ |
Initialize the LRUCache. |
| Method | popitem |
Pop an item from the cache and call the (optional) eviction callback. |
| Instance Variable | _evict |
The eviction callback function. |
Initialize the LRUCache.
| Parameters | |
maxsize:int | The maximum size of the cache. |
getsizeof:Callable | Optional function to determine the size of an item. |
evict:Callable | Optional callback function that is called when an item is evicted. |