Questions tagged [caffeine-cache]

A high-performance in-memory cache for Java and other JVM languages.

Caffeine is a cache library with near-optimal performance; flexible configuration; blocking and non-blocking APIs; and integration points for external persistence, monitoring, and plug-in operation with many popular frameworks.

128 questions
0
votes
1 answer

How many Caffeine Cache instances in an application is too much?

I have a use case where I want to Cache a Map of elements against String keys where each element in the map can have its own expiry. I was planning to use a Cache of Caches and utilize the really cool variable expiry in Caffeine. So something…
ab m
  • 422
  • 3
  • 17
0
votes
0 answers

Example of Caffeine per key expiryusage

Are there any examples of how to use per key expiry in Caffeine? I see the following example -- does it mean we are create a Caffeine cache instance per…
ab m
  • 422
  • 3
  • 17
0
votes
1 answer

Spring Boot Caffeine Cache with Spring Expression Language

I am using Spring boot with Caffeine Cache. My key for the cache is a Long and I need the key to be for eg : "1234-RULE" where 1234 is the Long object and -RULE is just a suffix. I tried the below to achieve this : private final static String…
T Anna
  • 874
  • 5
  • 21
  • 52
0
votes
0 answers

Caffeine read/write taking longer under high load

This is how I build my Caffeine Cache in Spring boot: Caffeine.newBuilder() .initialCapacity(200000) .maximumSize(200000) .expireAfterWrite(15, TimeUnit.MINUTES) …
0
votes
0 answers

CaffeineCache why loadSuccessCount doesn't increase when using refreshAfterWrite?

I am using LoadingCache in CaffeineCache. I set refreshAfterWrite to 30 minute and checked the stats by Caffeine.stats(). I expected the loadSuccessCount value will be increased after 30 minutes but it's as same as before 30 minutes. Below is code: …
0
votes
2 answers

Trouble configuring spring caffeine cache manager

I have a spring boot project which serves as a library (packaged jar file) to some other project. I am trying yo configure caffeine cache that will refresh asynchronously after request is made to the service. pom.xml (includes) :
Einstein_AB
  • 396
  • 5
  • 22
0
votes
1 answer

Cache Kafka Records using Caffeine Cache Springboot

I am trying to cache Kafka Records within 3 minutes of interval post that it will get expired and removed from the cache. Each incoming records which is fetched using kafka consumer written in springboot needs to be updated in cache first then if it…
0
votes
1 answer

Dynamically toggling recording stats on Caffeine Cache

I would like to be able to dynamically toggle the recording of stats of Caffeine Caches on demand via REST endpoint, or JMX Method We have a large scale application where we use several instances of Caffeine Caches. We could use every possible…
Javo
  • 435
  • 1
  • 5
  • 16
1 2 3
8
9