CachePolicy class

Instances of this type provide configuration for the 'Cache-Control' header.

Typically used by FileController. See FileController.addCachePolicy.

Constructors

CachePolicy({bool preventIntermediateProxyCaching = false, bool preventCaching = false, bool requireConditionalRequest = false, Duration? expirationFromNow})
Creates a new cache policy.
const

Properties

expirationFromNow Duration?
Sets how long a resource is valid for.
final
hashCode int
The hash code for this object.
no setterinherited
headerValue String
Constructs a header value configured from this instance.
no setter
preventCaching bool
Prevents any caching of a response by a proxy or client.
final
preventIntermediateProxyCaching bool
Prevents a response from being cached by an intermediate proxy.
final
requireConditionalRequest bool
Requires a client to send a conditional GET to use a cached response.
final
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