Is it possible to have a cache that shares in-flight requests? #2002
-
Suppose I fire off two requests in quick succession, with the same cache key, via a Polly cache. Is it possible for them to share execution results? The second request would not trigger any extra execution; instead it would be passed the result of the first request once it is ready. |
Beta Was this translation helpful? Give feedback.
Answered by
peter-csala
Mar 1, 2024
Replies: 1 comment 2 replies
-
The cache policy implements a cache-aside pattern. That means if your second request does not find any item in the cache with the given key |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
njlr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The cache policy implements a cache-aside pattern.
That means if your second request does not find any item in the cache with the given key
then it passes through the cache and fetches the data from the original data source, just like your first request.