Skip to content

Support caching annotations for CompletableFuture return values [SPR-12967] #17559

Closed
@spring-projects-issues

Description

@spring-projects-issues
Collaborator

Lukas Krecan opened SPR-12967 and commented

It would be nice to support caching of ListenableFuture (CompletableFuture) results. Imagine that your method returns ListenableFuture and you want to cache the result (not the future itself). If I am not mistaken it is not currently supported.

I may send you a pull request, but I'd like to hear if it makes sense. It may be a bit confusing since the cache would be filled/evicted not upon the method exit but upon the future completion.


Affects: 4.1.6

Activity

spring-projects-issues

spring-projects-issues commented on May 5, 2015

@spring-projects-issues
CollaboratorAuthor

Lukas Krecan commented

Hint of the solution lukas-krecan@48329ff

spring-projects-issues

spring-projects-issues commented on May 15, 2015

@spring-projects-issues
CollaboratorAuthor

Stéphane Nicoll commented

We don't foresee such feature in the 4.x line as it sounds it's part of a more general reactive effort.

Looking at your proposal it has significant impacts on the boundaries and the semantics of the caching aspect (basically what happens when we exit the method vs. what happens when the value to cache is actually made available). JSR-107 has also some plans to add an asynchronous API (see this issue) so this request may benefit from that stuff.

added
in: coreIssues in core modules (aop, beans, core, context, expression)
and removed on Jan 11, 2019
added
status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process
and removed on Jan 11, 2019
spring-projects-issues

spring-projects-issues commented on Jan 12, 2019

@spring-projects-issues
CollaboratorAuthor

Bulk closing outdated, unresolved issues. Please, reopen if still relevant.

added and removed
status: bulk-closedAn outdated, unresolved issue that's closed in bulk as part of a cleaning process
on Jul 21, 2023
self-assigned this
on Jul 21, 2023

8 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: enhancementA general enhancement

Type

No type

Projects

No projects

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @rstoyanchev@jhoeller@spring-projects-issues

      Issue actions

        Support caching annotations for `CompletableFuture` return values [SPR-12967] · Issue #17559 · spring-projects/spring-framework