Golang LRU
Keep a fixed number of recently accessed values in memory.
hashicorp · Code and testing
GitHub projectOpen source Open on GitHubHow to try it
In a new Go module, add github.com/hashicorp/golang-lru/v2 at v2.0.7. Use two cache slots and confirm the least-used sample entry is removed.
What we tested
v2.0.7. Use two cache slots and confirm the least-used sample entry is removed. Evicted only the least recently used fixture entry and kept Seeds.