spring-cache Questions
4
Solved
I'm learning Spring WebFlux and during writing a sample application I found a concern related to Reactive types (Mono/Flux) combined with Spring Cache.
Consider the following code-snippet (in Kotl...
Dagny asked 8/1, 2018 at 18:53
11
I have implemented a cache and now I want to add an expiry time.
How can I set an expiry time in spring boot with @Cacheable?
This is a code snippet:
@Cacheable(value="forecast",unless="#result...
Hhour asked 15/1, 2015 at 16:26
1
I am using caffeine cache provider with spring annotations, I am not able to see the logs from caffeinecachemanager when the entry’s put in cache or evicted or any activities that happens on cache....
Disenchant asked 9/2, 2018 at 6:56
4
Solved
I'm trying to call a @Cacheable method from within the same class:
@Cacheable(value = "defaultCache", key = "#id")
public Person findPerson(int id) {
return getSession().getPerson(id);
}
public...
Radiograph asked 24/8, 2012 at 20:11
3
With Spring Boot 2.1 I am defining a RedisCacheManager bean in a configuration file, with Java configuration. Everything works correctly but I would like sometimes to disable it, for instance in th...
Scotopia asked 9/5, 2019 at 11:9
6
Solved
I'm looking for 2 things:
How to disable all caching during development with Spring boot "dev" profile. There doesn't seem to be a general setting to turn it all off in application.prope...
Nonchalant asked 10/3, 2016 at 12:56
8
Solved
Is it possible to schedule spring cache eviction to everyday at midnight?
I've read Springs Cache Docs and found nothing about scheduled cache eviction.
I need to evict cache daily and recache it...
Standley asked 9/3, 2017 at 6:11
4
Solved
I am facing issue while getting value from cache.
java.lang.RuntimeException: java.lang.ClassCastException: com.mycom.admin.domain.User cannot be cast to com.mycom.admin.domain.User
Cache Confi...
Wieland asked 3/1, 2016 at 15:4
1
Solved
We are using Redis cache for storing data in cache in our application. We are directly using
@Cacheable to allow caching and using redis underneath to cache. Below is the config
Redis Config -
@Con...
Abyss asked 8/9, 2023 at 21:39
5
Issue is when using Spring cache with redis cache manager, not able to deserializer Spring Pageable response due to no default constructor
The spring boot version used is 2.1.4.RELEASE
Redis config...
Income asked 3/5, 2019 at 7:58
5
Solved
Currently I am working with a Spring Cache and the @Cacheable/@CacheEvict annotations.
I would like to get some sort of a console log statement like "INFO: i got those values from the cache, NOT f...
Tightlipped asked 17/5, 2016 at 15:57
4
related to the commit in spring framework https://github.com/spring-projects/spring-framework/commit/5aefcc802ef05abc51bbfbeb4a78b3032ff9eee3
the initialisation is set to a later stage from afterP...
Dogy asked 5/2, 2015 at 17:15
4
Solved
I'm having a problem with @org.springframework.cache.annotation.Cachable annotation:
@Bean
public ConcurrentMapCache cache() {
return new ConcurrentMapCache(CACHE);
}
@Cacheable(CACHE)
public St...
Richey asked 20/2, 2018 at 15:31
4
Solved
I'm looking to add several distinct LoadingCache's to a Spring CacheManager, however I don't see how this is possible using CaffeineCacheManager. It appears that only a single loader is possible fo...
Whereto asked 12/6, 2017 at 19:27
9
We have rest api application. We use redis for API response caching and internal method caching. If redis connection then it is making our API down. We want to bypass the redis caching if that redi...
Chemarin asked 12/3, 2015 at 7:9
2
I have an application using Spring Boot 2. I would like to test a method with @Cacheable (Spring Cache) on it. I made a simple example in order to show the idea:
@Service
public class KeyService {...
Sized asked 24/5, 2018 at 23:33
2
Solved
I have a similar problem which but sometimes it works. The error described only happens once in a while.
I am using spring 3.2.5 and ehcache 2.6.5.
Exception trace:
org.springframework.expressio...
Subsequent asked 19/6, 2014 at 7:30
2
Solved
I recently upgraded a spring boot application from 1.5 to 2.0.1. I also migrated the prometheus integration to the new actuator approach using micrometer. Most things work now - including some cust...
Gripper asked 6/4, 2018 at 16:17
1
Given I have Spring Data repository and I put Cacheable annotation on findAll method:
@Repository
@CacheConfig(cacheNames = TEMPLATE_CACHE)
public interface TemplateRepository extends JpaRepositor...
Zadoc asked 11/2, 2019 at 10:29
4
I have a simple sprint boot application using spring boot 1.5.11.RELEASE with @EnableCaching on the Application Configuration class.
pom.xml
<dependency>
<groupId>org.springframework.b...
Amphioxus asked 17/4, 2018 at 18:27
4
Solved
I am trying to load some context from an RSS feed and pass it as a cache to the client using ehcache library in spring. here is my code :
import org.springframework.cache.annotation.Cacheable;
@S...
Diplex asked 26/2, 2014 at 17:2
1
I have an method called getUserById
@Cacheable(value = "Account", key = "#accountId")
public Account getUserById(Long accountId) {
and another method called getUserByIds
@Cacheable(?????)
publi...
Theoretics asked 17/8, 2018 at 3:10
1
Solved
I am new to caching thing and learning some different solutions for my spring boot app. I was looking at Spring Cache and it is simple caching mechanism (that was what I look for) than I saw redis ...
Dorsy asked 2/5, 2022 at 21:2
1
Is it possible to use Caffeine's CacheLoader::loadAll with @Cacheable annotated method with collection parameter, like
@Cacheable(cacheNames = "exampleCache", cacheManager="exampleCa...
Bounteous asked 2/5, 2022 at 12:52
6
Solved
I have the need to cache some the results of some asynchronous computations. In detail, to overcome this issue, I am trying to use Spring 4.3 cache and asynchronous computation features.
As an exa...
Klemens asked 7/11, 2017 at 14:38
1 Next >
© 2022 - 2025 — McMap. All rights reserved.