HTTPCachePolicy class

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

Typically used by HTTPFileController. See HTTPFileController.addCachePolicy.

Constructors

HTTPCachePolicy({bool preventIntermediateProxyCaching: false, bool preventCaching: false, bool requireConditionalRequest: false, Duration expirationFromNow: null })
Creates a new cache policy. [...]
const

Properties

expirationFromNow Duration
Sets how long a resource is valid for. [...]
final
headerValue String
Constructs a header value configured from this instance. [...]
read-only
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
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

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