Questions tagged [caffeine]

Caffeine is an open source cache for Java 8 and above. It offers a near optimal hit rate, excellent concurrent performance, and a variety of features packed into a simple API.

Caffeine is a robust, feature packed, high performance cache for the Java ecosystem.

The cache is an evolution of two highly successful, popular libraries. It provides the features and similar interfaces as Google Guava's cache, but modernized for Java 1.8+. Caffeine's and Guava's concurrency model are based on ConcurrentLinkedHashMap, a cache often used by performance critical products like Apache Cassandra. The experiences learned developing those libraries, as well as newly published research, allow Caffeine to continue to push the envelope of what to expect from a modern cache.

Downloads and more information: https://github.com/ben-manes/caffeine

128 questions
0
votes
0 answers

How to call @Cachable on startup in spring boot using caffeine cache?

I want to get data from DB and store into cache on startup using caffeine cache. Whenever i want that data i need to fetch it from cache itself without calling DAO class I'm new to cache.
ulagan
  • 21
  • 3
0
votes
0 answers

spring boot caching with caffeine to load entire table in cache with refreshAfterWrite

I'm already using spring boot and would like to be able to use the the cache layer it provides to cache and entire table in the cache. But I also need to be able to refresh the cache after a period of time (every 5 minutes). The standard cacheable…
Oggie
  • 387
  • 2
  • 5
  • 15
0
votes
0 answers

Using Caffeine for values on disk

I'm thinking about using Caffeine for values off-loaded to disk. The keys are small, but the values may take a few megabytes. I guess, I can rely on a RemovalListener for cleaning up the mess. For limiting the disk usage, I can use Caffeine.weigher.…
maaartinus
  • 44,714
  • 32
  • 161
  • 320
0
votes
0 answers

Unknown Class and Method in Caffeine Cache Manual Population Example

What is the Graph class and createExpensiveGraph() method in the Manual Population example of Caffeine Cache: Cache cache = Caffeine.newBuilder() .expireAfterWrite(10, TimeUnit.MINUTES) .maximumSize(10_000) .build(); //…
Fuzzy Analysis
  • 3,168
  • 2
  • 42
  • 66
0
votes
1 answer

Caffeine Cache, get oldest element

Since the concurrentedLinkedHashmap authors do advice to switch to caffeine if using java 8. I wanted to know how I can get the oldest element of the cache. (In the LinkedHashMap I'm able to remove the first element of the iterator to achieve…
raycons
  • 735
  • 12
  • 26
0
votes
1 answer

How integrate caffeine with Spring 3.1?

There are a lot of example about caffeine and Spring 4+ or Spring boot integration. But how integrate caffeine with Spring 3.1 and Spring cache (not JCache)?
Cherry
  • 31,309
  • 66
  • 224
  • 364
0
votes
0 answers

Using Caffeine. Error with "get" in cache

Here's the code: package misc; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.Cache; import org.openjdk.jmh.annotations.*; import org.openjdk.jmh.runner.Runner; import…
Saurav Sircar
  • 1,743
  • 2
  • 12
  • 12
-1
votes
2 answers

Max eden space size in caffeine cache

Is there a way to configure the maximum eden space size in caffeine cache? If not, what is the default size?…
Jin H. Wan
  • 31
  • 1
1 2 3
8
9