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
1
vote
0 answers

Caffeine Cache implementation manually

Hi I am planning to use Guava Cache or Caffeine Cache in my application as below way - On application start DB call initiated and store the result into cache. I don't want to use expiration or recycling feature of above cache means data should…
ppb
  • 2,299
  • 4
  • 43
  • 75
1
vote
0 answers

Is there a chance that caffeine cache in springboot cause a 500 or timeout error due to too much data being cached?

Hi I am a newbie to springboot. I am using caffeine cache. Recently, I am getting a lot of 500 errors when the system calls an endpoint. The errors are like below: 2021-09-17 00:37:12.127 WARN 1 --- [ Thread-33]…
1
vote
1 answer

What is the (default) Cache size limit in Play Framework when using Ehcache and/or Caffeine?

Recently I switched my Play Framework-based project from Ehcache to Caffeine, because the Play documentation for version 2.8 says "For in-process caching Caffeine is typically the best choice." Now, I implemented a little "test" to see how many…
dtr84
  • 241
  • 1
  • 2
  • 10
1
vote
2 answers

How to use caffeine getAll()?

The title is very straightforward, I am trying to use caffeine cache for my Minecraft plugin and I can't seem to find any good examples for cache.getAll(). The documentation doesn't help either. All I see is <,>, and ?. I really think that…
Pro Poop
  • 357
  • 5
  • 14
1
vote
1 answer

caffeine Cache is not evicted after expireAfterAccess/expireAfterWrite

My configuration: @Bean public CaffeineCacheManager cacheManager() { return new CaffeineCacheManager(); } @Bean public CaffeineCache testCache() { return new CaffeineCache("test_cache", Caffeine.newBuilder() …
gstackoverflow
  • 36,709
  • 117
  • 359
  • 710
1
vote
1 answer

How to write a cache loader for Caffeine LoadingCache in "Scala" for "refreshAfterWrite" to work

Scala application use case: We have a Scala based that module reads the data from global cache (Redis) and save the same into local cache(Caffeine LoadingCache). As we want this data to be refreshed asynchronously, we are using LoadingCache with…
1
vote
1 answer

Is cacheName needed at CaffeineCacheManager() constructor?

I have a MultipleCacheManager class that looks like this: @EnableCaching public class MultipleCacheManagerConfig { @Bean @Primary public CacheManager mainCacheManager() { // instantiate caffeine manager and add in…
zakpruitt
  • 162
  • 2
  • 11
1
vote
0 answers

java.lang.IllegalArgumentException: Cannot find cache named ... for Builder

I am getting error while implementing Caching (using Caffeine Cache) in an existing project. Same code works fine for example application. I know similar questions has already been asked but neither worked for me. I have implemented using this…
DKS
  • 306
  • 1
  • 2
  • 16
1
vote
1 answer

How to get map of settings from application.yml?

Here is my application.yml config: spring: cache: cache-names: all_config_bundle, all_config_dependence, config_plan caffeine.spec: maximumSize=100, expireAfterAccess=0s caches: all_config_bundle: maximumSize=100,…
Maksym Rybalkin
  • 453
  • 1
  • 8
  • 22
1
vote
1 answer

Scalacache delete from cache set up with memoizeF

I'm using CaffeineCache together with memoizeF to cache the result of an operation that takes a case class as an input, like this: case class Foo(id: UUID, bar: String) implicit val myCache: CaffeineCache[Foo] = …
greenTea
  • 204
  • 2
  • 7
1
vote
4 answers

Java memory cache

Is there any possibility to implement a cache in memory to avoid full heap consumption? My spring-boot java application uses cache in memory with an expiration policy set to 1 hour (Caffeine library is used for caching purposes). After that time all…
Wenaro
  • 125
  • 8
1
vote
1 answer

`java.lang.ClassNotFoundException: com.github.benmanes.caffeine.cache.Caffeine` exception when jackson-core is upgraded to 2.11.2

I've used com.fasterxml.jackson.core (v2.8.11) and com.github.ben-manes.caffeine (v2.8.1) maven dependencies in my Spring project. When I upgraded the jackson-core version from 2.8.11 to 2.11.2 I'm getting java.lang.ClassNotFoundException:…
gkaka
  • 61
  • 1
  • 6
1
vote
1 answer

How to pass more than one parameter in google Cache CacheLoader?

I want to use google Cache to cache my data,So I write the code like this.I find that it can only pass one parameter that called key,But In my method,I have the other parameter,How to fix my code? private LoadingCacheS
flower
  • 2,212
  • 3
  • 29
  • 44
1
vote
1 answer

Using of Cache component in order to save variables as global in Apache Camel

The goal is to make reusable a variable taken from the body in order to use it also for other transitions through the route. More specific, the intent was to obtain a token from the interface and using it for further accesses as in the image.Flow…
Logistics
  • 21
  • 1
  • 3
1
vote
1 answer

Spring cache Caffeine integration without SpringBoot

I want to integrate Caffeine Cache in my Spring 5 application. I know that I need the CaffeineCacheManager, but i dont have the class. The only way i found is to add the SpringBoot Starter Cache package to the pom, but i dont want to use Spring…
1 2
3
8 9