CacheOptions class Null safety

Constructors

CacheOptions({bool forceUpdate = false, bool forceCache = false, bool returnCacheOnError = true, bool ignoreCache = false, CacheKeyBuilder keyBuilder = defaultCacheKeyBuilder, CacheShouldBeSaved shouldBeSaved = defaultShouldBeSaved, CacheStore? store, Duration expiry = const Duration(minutes: 5)})
const

Properties

expiry Duration
The duration after the cached result of the request will be expired.
final
forceCache bool
Forces to return the cached value if available (even if expired).
final
forceUpdate bool
Forces to request a new value, even if an valid cache is available.
final
hashCode int
The hash code for this object.
read-onlyinherited
ignoreCache bool
Indicates whether the request should bypass all caching logic.
final
keyBuilder CacheKeyBuilder
Builds the unqie key used for indexing a request in cache.
final
returnCacheOnError bool
If true, on error, if a value is available in the store if is returned as a successful response (even if expired).
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
shouldBeSaved CacheShouldBeSaved
A way of filtering responses (for exemple regarding the result status code, or the content length).
final
store CacheStore?
The store used for caching data.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

uuid Uuid
final

Static Methods

defaultCacheKeyBuilder(BaseRequest request) String
defaultShouldBeSaved(StreamedResponse response) bool