Skip to content

Use async cache lookup for suspending functions - #37253

Open
sugowslt wants to merge 1 commit into
spring-projects:mainfrom
sugowslt:fix/36644-suspend-cache-retrieve
Open

Use async cache lookup for suspending functions#37253
sugowslt wants to merge 1 commit into
spring-projects:mainfrom
sugowslt:fix/36644-suspend-cache-retrieve

Conversation

@sugowslt

@sugowslt sugowslt commented Sep 7, 2026

Copy link
Copy Markdown

Closes gh-36644

Summary

  • Route Kotlin suspending @Cacheable functions through the asynchronous Cache.retrieve() lookup path.
  • Keep the existing reactive adapter behavior and synchronous lookup behavior for ordinary methods.
  • Add regression coverage for cache misses and hits on suspending and ordinary functions.

Testing

  • ./gradlew :spring-context:test --tests org.springframework.cache.KotlinCacheAsyncLookupTests --no-daemon --no-scan --max-workers=2
  • ./gradlew :spring-context:check --no-daemon --no-scan --max-workers=2

Closes spring-projectsgh-36644

Signed-off-by: 신재현 <sugowslt@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged or decided on label Sep 7, 2026
@sbrannen sbrannen added the theme: kotlin An issue related to Kotlin support label Sep 8, 2026
@bclozel bclozel added the in: core Issues in core modules (aop, beans, core, context, expression) label Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: core Issues in core modules (aop, beans, core, context, expression) status: waiting-for-triage An issue we've not yet triaged or decided on theme: kotlin An issue related to Kotlin support

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve non-blocking support for @Cacheable suspend functions by using retrieve() instead of get()

4 participants