Hacker GitHub

← All repos

ben-manes/caffeine

View on GitHub ↗ ★ 17,930 Java

A high performance caching library for Java

51 mentions on Hacker News by 19 people: 4 stories, 47 comments · first 2015-02-24 · latest 2025-03-06

Mentions per year 51 mentions · busiest year 2019 (8)
20082026
  1. …based on Java 8's CHM rewrite, plus many learnings. You might look at its benchmarks for ideas: https://github.com/ben-manes/caffeine/wiki/Benchmarks 5. Data structures are surprisingly tricky. For example see this analysis showing an…
  2. …adapts automatically between LRU and LFU. The original algorithm is called Windiw TinyLFU (design https://github.com/ben-manes/caffeine/wiki/Design ), see it in action e.g. here: https://github.com/ben-manes/caffeine/wiki/Efficiency
  3. …with ideas and fix unexpected issues until a correct, simple, elegant design emerges. [1] https://github.com/ben-manes/caffeine/discussions/1744
  4. …other language ecosystems have been slowly adopting similar ideas in their caching libraries. [1] https://github.com/ben-manes/caffeine/wiki/Efficiency#adapti...
  5. …is very common, where algorithms differ by how they promote and how/if they adapt the sizes. [1] https://github.com/ben-manes/caffeine/blob/master/simulator/... [2] https://github.com/ben-manes/caffeine/actions/runs/130865965...
  6. I went through some of the issues to see how aggressively they close them and found this gem: https://github.com/ben-manes/caffeine/issues/1824#issuecomme...
  7. …a batch operation based on a time/space window. Here is how we do it in the Java world. [1] [1] https://github.com/ben-manes/caffeine/tree/master/examples/c...
  8. …out (unfortunately) and most of them ended up at AWS, working on storage like S3 and Glacier. [1] https://github.com/ben-manes/caffeine/wiki/Efficiency#window ... [2] https://scholar.google.com/citations?user=kWivlnsAAAAJ&hl=en [3]…
    comment by donavanm · 2024-10-10 · in Working Set Size Estimation (2018)
  9. …to see how it compares. [1] https://www.usenix.org/system/files/conference/atc17/atc17-b... [2] https://github.com/ben-manes/caffeine/wiki/Simulator
    comment by NovaX · 2024-01-09 · in Why Aren't We Sieve-Ing?
  10. …to be easily disproven, so I have not implement this policy in Caffeine’s simulator yet. [1]: https://github.com/ben-manes/caffeine/wiki/Simulator [2]: https://github.com/1a1a11a/libCacheSim/discussions/20
  11. …reviewed and linked from the official S3-FIFO page. https://s3fifo.com A benchmark is as follows. https://github.com/ben-manes/caffeine/wiki/Efficiency I can't deal with you any longer. Over.
  12. That, and also when caffeine came out it replaced one of the major uses (caching) of guava. https://github.com/ben-manes/caffeine
    comment by shrdlu2 · 2023-11-08 · in Guava: Google core libraries for Java
  13. …valid points but, when used properly, Caffeine + Reactor can work together really nicely [1]. [1]: https://github.com/ben-manes/caffeine/blob/master/examples/c...
  14. …while excellent, the implementation logic is not intuitive which makes it frustrating to debug. [1] https://github.com/ben-manes/caffeine/blob/master/simulator/... [2] https://github.com/ben-manes/caffeine/blob/master/simulator/... [3]…
    comment by NovaX · 2023-06-25 · in FIFO can be Better than LRU [pdf]
  15. I wonder why all these papers ignore comparison against W-TinyLFU. https://github.com/ben-manes/caffeine/wiki/Efficiency Shows that it really outperforms ARC as well and they also have an optimal oracle version that they evaluate against…
    comment by vlovich123 · 2023-06-23 · in FIFO can be Better than LRU [pdf]
  16. …don't gather statistics on the demonstration server. I believe that the in-memory caffeine cache ( https://github.com/ben-manes/caffeine ) saved me.
    comment by bchapuis · 2023-05-29 · in Apache Baremaps: online maps toolkit
  17. …of the work behind that policy leads me to believe it could be improved to handle that case. [1] https://github.com/ben-manes/caffeine/wiki/Efficiency#adapti...
    comment by NovaX · 2022-08-16 · in DragonFlydb: Cache Design
  18. Yeah, saves you from thundering herd problems https://github.com/ben-manes/caffeine cache does something similar by caching the future that gets returned on look-ups if the value is still being computed
  19. And also a (very efficient) Java cache library https://github.com/ben-manes/caffeine
  20. …(Java) uses TinyLFU, which "builds upon Bloom filter theory" (from the abstract of the paper): https://github.com/ben-manes/caffeine and https://arxiv.org/pdf/1512.00727.pdf
  21. …[3] https://docs.google.com/spreadsheets/d/16wEq5QBzqOtownEtZvZe... [4] https://github.com/ben-manes/caffeine/blob/master/simulator/... [5] https://github.com/ben-manes/caffeine/blob/master/simulator/...
  22. …than suffer much lower hit rates or have long pauses on a write due to eviction inefficiencies. [1] https://github.com/ben-manes/caffeine/wiki/Benchmarks#read-1... [2] https://github.com/ben-manes/caffeine/blob/master/caffeine/s...
  23. …definitely the most relevant and relatable when I was involved in this area a few years back. [1] https://github.com/ben-manes/caffeine/wiki/Efficiency#window... [2] https://scholar.google.com/citations?user=kWivlnsAAAAJ&hl=en [3]…
  24. …there is interest in replacing ARC, all of our contacts were too busy to explore that option. [1] https://github.com/ben-manes/caffeine/wiki/Efficiency
  25. …seems okayish by borrowing LIRS' ideas, but I think it performs worse in most comparisons. [1] https://github.com/ben-manes/caffeine/blob/master/simulator/... [2] https://github.com/ben-manes/caffeine/blob/master/simulator/... [3]…
  26. …to correct for LRU-biased workloads [2]. [1] https://dl.acm.org/doi/10.1145/3274808.3274816 [2] https://github.com/ben-manes/caffeine/wiki/Efficiency#adapti...
    comment by NovaX · 2020-08-28 · in Constant Time LFU
  27. …access. This is worth a read: https://blog.dgraph.io/post/introducing-ristretto-high-perf-... [1]: https://github.com/ben-manes/caffeine
  28. …and I briefly outlined my understanding of the current state when responding to a github issue: https://github.com/ben-manes/caffeine/issues/345#issuecommen...
  29. …set a timeout on the future as the entry will be discarded if the future results in an error. [1] https://github.com/ben-manes/caffeine/wiki/Population
    comment by NovaX · 2019-04-18 · in Thundering Herds and Promises
  30. …a cache should excel at. Unfortunately LRU doesn't because it can be easily polluted. (examples: https://github.com/ben-manes/caffeine/wiki/Efficiency ) A database will often scan many records which would flush an LRU. Postgres uses small…
    comment by NovaX · 2019-03-11 · in The State of Caching in Go
  31. Caffeine, a caching library for Java, has a nice write-up on more advanced cache eviction strategies. https://github.com/ben-manes/caffeine/wiki/Efficiency
  32. …than LRU on most workloads is Window TinyLFU. Some nice simulations and graphs can be found here: https://github.com/ben-manes/caffeine/wiki/Efficiency
  33. …at a random index and increment for the key on each operation. This is a good example in Java, https://github.com/ben-manes/caffeine/blob/master/caffeine/s... I would expect ~15-30ns per integer key lookup on a decent hashtable, w/o…
  34. …disabled), 224 GB, Ubuntu 15.04. They show a slight superlinear growth for reads (Caffeine). https://github.com/ben-manes/caffeine/wiki/Benchmarks#server... Both benchmarks use a Zipf distribution. I believe he said it only supports…
  35. …Caffeine which I think shares authors with Guava's cache. Kind of a 2.0 /lessons learned iteration. https://github.com/ben-manes/caffeine
  36. …number. It comes off a little biased since LIRS outperforms ARC in most of their own traces. https://github.com/ben-manes/caffeine/wiki/Simulator
    comment by NovaX · 2018-06-16 · in Caching Beyond RAM: The Case for NVMe
  37. …as many believe. LIRS or TinyLFU based policies are what new implementations should be based on. https://github.com/ben-manes/caffeine/wiki/Efficiency
    comment by NovaX · 2018-06-15 · in Caching Beyond RAM: The Case for NVMe
  38. …the hit rate, and using hill climbing to adjust the region sizes to best fit the workload. [1] https://github.com/ben-manes/caffeine/wiki/Efficiency#glimps...
  39. …supported in a bunch of other libraries: https://github.com/AsyncHttpClient/async-http-client/ , https://github.com/ben-manes/caffeine , https://github.com/mp911de/lettuce .
    comment by tomfitz · 2017-02-20 · in Java libraries you can't miss in 2017
  40. …database and search workloads. It is also much simpler to implement and is more memory efficient. https://github.com/ben-manes/caffeine/wiki/Efficiency The W-TinyLFU variant better handles recency by using an admission window so that new…
  41. …[1] I recommend reading the TinyLFU paper as I think it is the best match to your ideas. [2] [1] https://github.com/ben-manes/caffeine [2] http://arxiv.org/pdf/1512.00727.pdf
    comment by NovaX · 2016-04-24 · in Ask HN: Cache Hit Ratio
  42. TinyLFU+FIFO is in the simulator ( https://github.com/ben-manes/caffeine/wiki/Simulator ). However, you'd probably also want the window cache to correct the deficiency outlined in the updated paper ( http://arxiv.org/pdf/1512.00727.pdf ).…
    comment by NovaX · 2016-01-29 · in Apache Traffic Server
  43. …. Gil submitted it to Caffeine (Java caching library) last summer, https://github.com/ben-manes/caffeine/pull/24 . It got some traction over the winter and is now showing up in other places ( https://issues.apache.org/jira/br
    comment by donavanm · 2016-01-29 · in Apache Traffic Server
  44. …are very similar, but those that take advantage of historic data can make more intelligent choices. https://github.com/ben-manes/caffeine/wiki/Efficiency
  45. …eviction policy that outperforms LRU [3]. [1] https://github.com/memcached/memcached/pull/97 [2] https://github.com/ben-manes/caffeine/wiki/Design [3] https://github.com/ben-manes/caffeine/wiki/Efficiency
  46. * Benchmarks: https://github.com/ben-manes/caffeine/wiki/Benchmarks * Design: https://github.com/ben-manes/caffeine/wiki/Design This is an evolution of two previously successful caching libraries: * ConcurrentLinkedHashMap:…
    comment by NovaX · 2015-03-24 · in Caffeine – Java 8 caching
  47. …to other shared concurrent structures. [1] http://www.cs.bgu.ac.il/~hendlerd/papers/DECS.pdf [2] https://github.com/ben-manes/caffeine