Work-in-Progress: This repository will be the home of gcache2, a caching library for Golang. Ideally the only one you will ever need. To reach that ambitious goal, I am taking some time to scope and re-architecture gcache such that it becomes easier to add features, maintain existing ones, and get total testing coverage of the execution paths that matter. If you are interested in joining this effort, take a look at the issues! Stay tuned, friends. (:
The only embedded caching library you will ever need, in Golang.
A variety of concurrency-safe caches are available:
-
LFU (Least-Frequently-Used)
-
LRU (Least-Recently-Used)
-
ARC (Adaptive-Replacement policy)
-
TinyLFU ("clever" admission policy)
-
RR (RandomReplacement)
Other features:
-
Expirable entries
-
Optional support for event handlers (on eviction, purge, set, loader).
-
Cache snapshots
$ go get github.com/aaronwinter/gcache2
Erwan Ounn (main contributor/maintainer of gcache2)
Jun Kimura (main contributor of gcache)