A golang LRU Cache for high concurrency
6720535fab
case which we can optimize out by being more explicit when we create a new item |
||
---|---|---|
bucket.go | ||
bucket_test.go | ||
cache.go | ||
configuration.go | ||
item.go | ||
item_test.go | ||
readme.md |
CCache
CCache is an LRU Cache, written in Go, focused on supporting high concurrency.
Lock contention on the list is reduced by:
- Introducing a window which limits the frequency that an item can get promoted
- Using a buffered channel to queue promotions for a single worker
- Garbage collecting within the same thread as the worker