CacheOptions class

Constructors

CacheOptions({bool forceUpdate: false, bool forceCache: false, CachePriority priority: CachePriority.normal, bool returnCacheOnError: true, bool isCached: true, CacheKeyBuilder keyBuilder: defaultCacheKeyBuilder, CacheStore store, Duration expiry: const Duration(minutes: 1)})
const
CacheOptions.fromExtra(RequestOptions request)
factory

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
isCached → bool
Indicates whether the request should use cache.
final
keyBuilder CacheKeyBuilder
final
priority CachePriority
The priority of a request will makes it easier cleanable by a store if needed.
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
store CacheStore
The store used for caching data.
final
hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

mergeIn(Options options) Options
toExtra() → Map<String, dynamic>
toOptions() Options
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

uuid Uuid
final

Static Methods

defaultCacheKeyBuilder(RequestOptions request) → String

Constants

extraKey → const String
"cache_interceptor_request"