Option to respect range during cache streaming #1184
Draft
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.
The core cache API allows for cache items to be concurrently streamed to / from the cache.
If:
to_stream_from_range
)then today, the core cache API will ignore the requested range and provide the whole body. There is no explicit notification that the whole body is provided instead of a range.
In this SDK release, this remains the default behavior. However, lookup calls (lookup, transaction lookup) now offer an
always_use_requested_range
option. If set to true, body reads conducted as part of this lookup/transaction/replacement will always use the requested range, even when streaming.In a future (major) SDK release, the default behavior will change to
always_use_requested_range
.