golang-lru
golang-lru copied to clipboard
add Values() method to get cache values
Hi @jefferai !
All the current cache implementations export the Keys() method which returns all the keys in the cache.
In some cases, like cache testing, you need to know all the cache values. You can do this via Keys() + Get() operation, but this is not an atomic operation.
So I present Values() which returns all the cache values in a similar way to Keys(). Please consider adding this method to the caches.
Thanks for this!