Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
64 views

I am trying to set up ehcache with Spring. It works on runtime, but after restart the cache in the application is empty. What am I doing wrong? I can't use the common ehcache.xml. @Configuration @...
Björn Bause-Engel's user avatar
0 votes
0 answers
28 views

I'm using the JTE template engine in a Spring Boot application like: @GetMapping("/") public String home(Model model) { List<Product> products = productRepo.findAll(); model....
eztam's user avatar
  • 3,873
0 votes
0 answers
50 views

I try to avoid a race condition using Infinispan (v 15.1.5) with the Spring Cache Annotations and Spring Boot (v 3.4.3). Two Threads are calling the @Cacheable and @CacheEvict methods at the same time....
Peter Buning's user avatar
0 votes
1 answer
291 views

I would like to enable/disable springboot cache with caffeine cache. With a property, something like my.property.cache.enabled=true or my.property.cache.enabled=false to enable and disable caching. ...
PatPanda's user avatar
  • 5,418
2 votes
1 answer
295 views

I have this simple piece of code, in which I would like to cache a very expensive http call. @RestController class ReportController { @Autowired ReportService reportService; @GetMapping("/...
PatPanda's user avatar
  • 5,418
1 vote
0 answers
80 views

How do I version spring cache redis objects? I am encountering issues between deploys when the object version changes, and no longer match the cache structure in redis. AI assistant gives a ...
Bill Pfeiffer's user avatar
0 votes
1 answer
53 views

For some reason I can see that object was passed not null, but in key expression it is null already. I am trying to read some data from DB and add it to the cache. Here are my methods. public void ...
Dmytro Guriev's user avatar
1 vote
1 answer
79 views

I have some custom annotation to distinguish the Service classes as @Retention(RetentionPolicy.RUNTIME) @Target(ElementType.TYPE) public @interface DataService { } @Retention(RetentionPolicy.RUNTIME)...
implosivesilence's user avatar
1 vote
1 answer
66 views

I tried the annotation @CachePut in the method updateCategoryCacheForCountry and it wasn't working. But when doing so programatically by getting the cache and using .put it works fine. What could be ...
Nicolas Zaeta's user avatar
0 votes
1 answer
219 views

I have a query in my Spring Boot 3.2 code that is exspensive to run and I would like to cache the value. The query is taking a few component parts and then counting them to return a single value. For ...
iamsimonsmale's user avatar
0 votes
1 answer
406 views

I am doing a sample project for managing some generic background jobs, mainly to practice how to work with cache in Spring Boot. My key problem is managing retention time for jobs, based on their ...
Jakub Łaba's user avatar
1 vote
0 answers
240 views

I have this class hierarchy where B & C extends an abstract class A. Within A, I used the typical jackson annotations to tell jackson how to serialize & deserialize the polymorphic structure. @...
Fabs's user avatar
  • 21
2 votes
0 answers
328 views

I have written below function to get All the pokemons. Now I want to add the functionality to cache the pokemons by id which is coming from the list. I am using Simple cache for Caching. Dependency: ...
Prashant Aghara's user avatar
0 votes
0 answers
28 views

I want to enable/disable spring boot( redis )cache based on the flag set in the properties file. Suppose I set cacheEnabled=true in the properties file then it should not consider cache mechanism for ...
Ravi 's user avatar
  • 11
0 votes
1 answer
683 views

I am using redis cache in spring boot application. Requirement is - We need data list on certain date filter. So to achieve that I used cacheable annotation. Now when I run it for first time, it ...
J. Doe's user avatar
  • 1
1 vote
0 answers
386 views

Right now, my app is organized like this: Controller Layer: Handles user requests. Business Service Layer: Manages data, including caching. Repository Layer: Deals with data storage. Code Example: //...
Akshaya Kumar's user avatar
2 votes
2 answers
9k views

I have this configuration class: @Configuration @EnableCaching public class CacheConfig { @Bean @Primary public CacheManager cacheManager() { CaffeineCacheManager cacheManager = ...
Nunyet Calçada's user avatar
0 votes
1 answer
593 views

I have a Cacheable method that returns an object containing data from multiple sources. In case of an error (ex: A source is unavailable), it will return with whatever partial data was retrieved. ...
Alex's user avatar
  • 1
-1 votes
1 answer
695 views

I am trying to implement EHCache 3 with spring boot 3 without xml configuration. I did below configuration for EHCache 3 @Bean public CacheManager getCacheManager() { CacheManager ...
Shiladittya Chakraborty's user avatar
1 vote
1 answer
3k views

I have a spring boot API which is using Redis. I'm trying to cover cases whereby when Redis goes down for whatever reason I am able to handle it and more importantly recover and serve from cache again....
MetaCoder's user avatar
  • 488
0 votes
1 answer
127 views

I have this abstract repository class: public abstract class FirestoreRepository<T> { protected Firestore db; protected FirestoreRepository(Firestore db) { this.db = db; } ...
quasimodo's user avatar
2 votes
0 answers
779 views

I have following Redis cache setup private RedisCacheConfiguration redisCacheConfiguration() { return RedisCacheConfiguration.defaultCacheConfig() .disableCachingNullValues() ....
absence's user avatar
  • 358
0 votes
1 answer
722 views

I am running Spring Boot version 2.6.14. Controller @PostMapping("/v1/books) public GenericResponse<Book> getBooks(BookRequest request) { return new GenericResponse<>( ...
Denis Kisina's user avatar
1 vote
2 answers
2k views

In Spring Boot, I would like to use one cache manager defined as bean plus Redis cache defined in application.yaml. But after define cache manager like bean the other one in application.yaml is ...
Pavel Hora's user avatar
0 votes
1 answer
109 views

I have a use case where we are trying to store and retrieve content from Redis cache. We are using spring-starter-cache for making use of the underlying redis cache storage. @Bean public ...
Abhilash's user avatar
  • 905

1
2 3 4 5
15