Open Richie94 opened 2 years ago
Hi @Richie94
I've merged the Spring Boot 2.7.5 only in 1.3.1-SNAPSHOT so far, and at least the integration tests there ran fine in the Github Action. Are the examples from the README working for you? Can you come up with a minimal reproducer for the problem you're experiencing? Either as a standalone project or (preferred) as a failing test case (you may add one there via pull request)?
Regarding findAll
: The README says that the return value, being a Map
, puts all the returned entries into the cache using the key of the map as the cache key. This essentially fills the whole cache and subsequent findById
calls are then already cached. Another call to findAll
will just update the cache then (cache invalidation is out of scope here, and is usually achieved by TTLs).
Okay, thanks, than its not exactly what we are looking for. We aim for a mechanism on how to cache findAll so that we can have the cached result on the second call, but also using CachePut and CacheEvict only for some specific ids, which then should ideally be replaced/evicted also in the findAll Cacheable...
I think I have a similar issue. After upgrading a Spring Boot app to spring-boot:3.0.2
, the @CollectionCacheable
annotation is seemingly ignored by the running application. Still fact-finding, but was wondering if you have plans to support.
@kwhitejr Spring Boot 3.x is currently not supported. Happy to accept PRs though.
Hey there,
I just try to get it run with your annotation, but it seems like this annotation gets completely ignored. I have @EnableCaching and also my @Cacheable annotations work like expected, but not the CollectionCacheable.
Im using Spring 2.7.5 and Kotlin, but also tried makeing a class with java where it also did not work. I see, that the CollectionCacheableCacheInterceptor gets called in the debug mode, but never checks my annotation.
Also I have the question as I where not able to test it, if it is intended that multiple calls to en empty findAll() Method would use the cache. So that first call sees its empty, so Im putting all with their key inside and second call just gets all the entries from a cache and returns it.