You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cache, allow custom wrapper types other than java.util.Optional [SPR-16530] #21073
Currently the caching annotations can only work with java.util.Optional. There's no support for other wrapper types (e.g. Vavr's Option/Try/Either/Lazy etc.).
I would like to be able to register custom return value unwrappers or something equivalent to the key property for the return value:
// Example with Vavr's Either
@CachePut(cacheNames = "myCache", condition = "#result.isRight()", result = "#result.getRight()")
Either<String, CacheData> myMethod(int id);
Activity