CachePolicy enum

Policy to handle request behaviour.

Inheritance

Constructors

CachePolicy()
const

Values

forceCache → const CachePolicy

Same as CachePolicy.request when origin server has no cache config.

In short, you'll save every successful GET requests.

refreshForceCache → const CachePolicy

Same as CachePolicy.refresh when origin server has no cache config.

noCache → const CachePolicy

Requests and skips cache save even if response has cache directives.

refresh → const CachePolicy

Requests regardless cache availability. Caches if response has cache directives.

request → const CachePolicy

Returns the cached value if available (and un-expired).

Checks against origin server otherwise and updates cache freshness with returned headers when validation is needed.

Requests otherwise and caches if response has directives.

Properties

hashCode int
The hash code for this object.
no setterinherited
index int
A numeric identifier for the enumerated value.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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

Operators

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

Constants

values → const List<CachePolicy>
A constant List of the values in this enum, in order of their declaration.