Top "Spring-cache" questions

Spring cache provides a Cache and CacheManager abstraction with several implementations including support for ehcache and JSR-107 providers.

How do I use the key, in a condition in Cacheable annotation

I'm caching the results of a function using the @cacheable annotation. I have 3 different caches and the key for each …

java spring ehcache spring-cache
Using multiple cache implementations with Spring Cache

I'm working on a Spring Boot app where I need to use both distributed (e.g. Hazelcast) and local (e.…

java spring caching spring-boot spring-cache
Caching Java 8 Optional with Spring Cache

I have a method: @Cacheable(key = "#jobId") public Optional<JobInfo> getJobById(String jobId) { log.info("Querying for job " + …

spring spring-cache
Spring Webflux and @Cacheable - proper way of caching result of Mono / Flux type

I'm learning Spring WebFlux and during writing a sample application I found a concern related to Reactive types (Mono/Flux) …

spring-boot spring-cache spring-webflux
How to disable Redis Caching at run time if redis connection failed

We have rest api application. We use redis for API response caching and internal method caching. If redis connection then …

spring-mvc redis spring-cache
Spring Boot Native cache : How to expire/remove cache data by individual keys/elements

We are calling Identity federation service to acquire user tokens very frequently and almost running load test on Identity service. …

spring-boot caching spring-cache
cannot access net.sf.ehcache.CacheManager, class file for net.sf.ehcache.CacheManager not found

I have been implementing some caching in my project using EhCache. I have added following dependencies to my pom.xml &…

maven spring-boot ehcache spring-cache terracotta
Asynchronous Cache Update With Spring Cache Abstraction

Using Spring's caching abstraction, how can I have a cache refresh an entry asynchronously while still returning the old entry? …

java spring caching asynchronous spring-cache
Junit for Spring Cache Manager

I am using spring caching layer in my application and I have got an issue as part of writing unit …

java spring junit mockito spring-cache
Is it possible to set a different specification per cache using caffeine in spring boot?

I have a simple sprint boot application using spring boot 1.5.11.RELEASE with @EnableCaching on the Application Configuration class. pom.xml &…

spring-boot spring-cache caffeine