micronaut-projects / micronaut-projects/micronaut-cache
Cached Flux with multiple values returns list wrapped in Flux
Nobody has claimed this yet.
- Dominant language
- PLSQL
- Stars
- 32
- Forks
- 36
- Avg merge
- 2h 2m
- Merged PRs (30d)
- 5
Description
Expected Behavior
Cached Flux (or any Publisher) with multiple values should return a Flux containing the same values. (Or fail instantly, if this should not be supported.)
Actual Behaviour
Cached Flux returns a Flux with the values wrapped in a List.
Steps To Reproduce
- Return
Fluxwith multiple values from a cached method
@Cacheable(cacheNames = ["sample"])
open fun flux(first: Int): Flux<Int> = Flux.just(first, first + 1)
- Call the cached service collecting the result
- Observe the result is list of list with values
Environment Information
No response
Example Application
https://github.com/tPeltola/mncache/tree/cache-flux-multiple
Version
3.7.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked example application and reproduce the cached Kotlin service method returning Flux.just(first, first + 1) on version 3.7.1. Trace the cache handling for a Publisher and verify that collecting the cached result preserves the individual values, or that unsupported caching fails immediately.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100