golang-lru
golang-lru copied to clipboard
Add Features: add MAdd and MGet
Update lru.go. Simple functions for many keys' operations with less mutex race.
A change just went in that updates how eviction is handled -- can you update this PR against it?
@bjkxt Got an approval from Brian, just looking for your changes against the new eviction code I think!
@bjkxt Got an approval from Brian, just looking for your changes against the new eviction code I think!
I think MAdd just takes the evictions of input keys and values to the caller. And the caller can decide how to handle these evictions.
Two issues:
- There seem to be no tests for this functionality
- The code doesn't actually check whether the various slices are the same length, so it will panic if the caller provides bad input