Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cache_mode_fn
was added toHttpCacheOptions
to allow different cache modes to be used for different requests. However,cache_mode_fn
was only consulted when determining if a request could be satisfied from the cache, not when determining whether to use an existing cached value or whether to cache a fresh value. The test was incorrectly passing becausecache_mode_fn
was setting the mode equal to the same value that it would have been otherwise.This PR makes all code paths use
cache_mode_fn
consistently and fixes thecache_mode_fn
test to rely oncache_mode_fn
working.