ben-manes/caffeine is an open source project licensed under Apache License 2.0 which is an OSI approved license.
Similar projects and alternatives to Caffeine
Linux kernel source tree
Extremely fast non-cryptographic hash algorithm
Scout APM - Leading-edge performance monitoring starting at $39/month. Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Glommio is a thread-per-core framework that aims to make the task of writing highly parallel asynchronous application in a thread-per-core architecture easier for rustaceans
minimize caching effects
Java 8 source preprocessor, adds new "caf expressions" to Java to help reduce boilerplate.
Linux Kernel: The multi-generational LRU
news.ycombinator.com | 2021-04-19
Segcache: A memory-efficient and scalable key-value cache for small objects [pdf]
news.ycombinator.com | 2021-04-12
A multi-threaded benchmark of a cache should be fully populated and use a scrambled Zipfian distribution. This emulates hot/cold entries and highlights the areas of contention (locks, CASes, etc). A lock-free read benefits thanks to cpu cache efficiency causing super linear growth.
This shows if the implementation could be a bottleneck and scales well enough, after which the hit rate and other factors are more important than raw throughput. I would rather sacrifice a few nanos on a read than suffer much lower hit rates or have long pauses on a write due to eviction inefficiencies.
Multigenerational LRU: more performant, versatile, straightforward than Linux's
I would recommend W-TinyLFU . It offers higher hit rates, is adaptive, has lower metadata overhead, is O(1), and is the only policy that is robust against all workload patterns we have tried. This is what I proposed to the Linux folks when analyzing DClock.
I met Kirk McKusick (BSD fame) at Fast'20 where he expressed interest in that for ZFS. We tried introducing the idea to the contributors at FreeBSD, Delphix, and LLNL. There is frustration at ARC being memory hungry and the locking is expensive. Unfortunately while interest in replacing ARC, all of our contacts were too busy to explore that option.
There's some really good explanation (and implementation) in the Caffeine library. Ben Manes worked with Gil Einziger on the implementation and actually contributed to an updated version of the TinyLFU paper, IIRC. Gil has a ton of very relevant work around cache admission, control, and information density.
Unfortunately cache admission is an understudied and woefully unimplemented area of CS & computer engineering as far as I can tell. There's some decent work around hardware layer problems, cache line insertion/eviction/etc, but not much in general purpose software caching. Gils research was definitely the most relevant and relatable when I was involved in this area a few years back.
to see how similar they are.
ARC obtained a lot of awareness but the hit rate is not that great. It is modestly better than LRU, but very wasteful in metadata overhead. LIRS is much better, except it is complex and the paper is confusing so almost all implementations are broken. DClock seems okayish by borrowing LIRS' ideas, but I think it performs worse in most comparisons.
Caffeinated, a work-in-progress preprocessor for Java ~8.
reddit.com/r/java | 2021-01-27
Please note that Caffeine is a widely used Java cache library, which makes the name of your project a bit of confusing.
Is it necessary to learn later versions of Java?
reddit.com/r/java | 2021-01-08
The one nice thing guava has (caches) has an alternative lib that does the job better (Caffeine https://github.com/ben-manes/caffeine )
How to Build an LRU Cache in Less Than 100 Lines of Code
reddit.com/r/programming | 2021-01-05
Caffeine (which uses TinyLFU) performs very well: https://github.com/ben-manes/caffeine/wiki/Efficiency
reddit.com/r/wertia | 2020-12-28