Part of bzrlib.lru_cache View In Hierarchy
Known subclasses: bzrlib.lru_cache.LRUSizeCache
|Method||__setitem__||Add a new value to the cache|
|Method||cache_size||Get the number of entries we will cache.|
|Method||keys||Get the list of keys currently cached.|
|Method||as_dict||Get a new dict with the same key:value pairs as the cache|
|Method||cleanup||Clear the cache until it shrinks to the requested size.|
|Method||clear||Clear out all of the cache.|
|Method||resize||Change the number of entries that will be cached.|
|Method||_record_access||Record that key was accessed.|
|Method||_remove_lru||Remove one entry from the lru, and handle consequences.|
Note that values returned here may not be available by the time you request them later. This is simply meant as a peak into the current state.
|Returns||An unordered list of keys that are currently cached.|
This does not completely wipe the cache, just makes sure it is under the after_cleanup_count.
If there are no more references to the lru, then this entry should be removed from the cache.