Rust SDK 0.11.5
- Core cache API: Opt-in to use ranges when streaming
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 types (LookupBuilder
, TransactionLookupBuilder
, ReplaceBuilder
)
now offer an always_use_requested_range
option.
If set, 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
.
- Core cache API: Explicit check of inherently invalid ranges
The core cache API (to_stream_from_range
) will now explicitly reject ranges where
the start is strictly after the end.
(Note that start and end are inclusive, so start == end
identifies a valid 1-byte range.)
- Config store: Allow config store values larger than 8k
Config store values can potentially be larger than 8k characters. The default limit is still 8k, but customers can now be individually assigned a larger limit (up to 32k).
This change updates the Rust SDK so that it resizes config store buffer on BUFLEN error, instead of returning an error. The default initial buffer length is 256.
- Core cache API: Clarify TTL vs. max_age
TTL and max_age
are two distinct concepts.
Max age gives the age of an item when it becomes stale;
TTL is not long from the current point in time until that age is reached.
The core cache API used the term ttl
in several places to refer to the max-age value.
In this version, we deprecate these ttl
methods (without changing their semantics),
and add ttl_remaining
and max_age
methods to provide clearer semantics.
- Image Optimizer: provide a clearer error when Image Optimizer is not enabled for a service
- Core cache API: documentation improvements
Prior change: Rust SDK 0.11.4