-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed as not planned
Closed as not planned
Copy link
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement
Description
Ken Schosinsky opened SPR-16530 and commented
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);Greetings,
Ken
Issue Links:
- Allow transaction control via Vavr Try type [SPR-15806] #20361 Allow transaction control via well-known method return types
- Incorrect return type of Kotlin suspending functions [SPR-16515] #21058 Incorrect return type of Kotlin suspending functions
theigl and odrotbohm
Metadata
Metadata
Assignees
Labels
in: coreIssues in core modules (aop, beans, core, context, expression)Issues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancementA general enhancement