Currently, the Quarkus Redis Cache implementation does not support caching methods that return a list or a collection of objects. For example, if we use caching as shown in the example below, Quarkus complains that it cannot determine the value type of the cache.
@ApplicationScoped
public class MyService {
@CacheResult(cacheName = "namesCache")
public List<String> fetchNames() {
// Do complex calculation
...
}
}
In many applications, methods that return a list of objects are common. Therefore i suggest a mechanism such that the Quarkus Redis Cache implementation can infer the type correctly and that the entire list and its contents can be serialized and deserialized correctly when stored in and retrieved from Redis.
Description
Currently, the Quarkus Redis Cache implementation does not support caching methods that return a list or a collection of objects. For example, if we use caching as shown in the example below, Quarkus complains that it cannot determine the value type of the cache.
In many applications, methods that return a list of objects are common. Therefore i suggest a mechanism such that the Quarkus Redis Cache implementation can infer the type correctly and that the entire list and its contents can be serialized and deserialized correctly when stored in and retrieved from Redis.
Implementation ideas
No response