Option to respect range during cache streaming#1184
Open
cceckman-at-fastly wants to merge 3 commits intomainfrom
Open
Option to respect range during cache streaming#1184cceckman-at-fastly wants to merge 3 commits intomainfrom
cceckman-at-fastly wants to merge 3 commits intomainfrom
Conversation
The core cache API allows for cache items to be concurrently streamed to / from the cache. If: - The size of the cached item's body was not provided by the writer - The reader requests a specific range of the cached item's body (`to_stream_from_range`) - The writer and reader are concurrent, i.e. the body is streamed from one to the other 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`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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_rangeoption. 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.