CachePolicy class

Message containing CachePolicy configuration for URL Map's Route Action.

Constructors

CachePolicy({List<String>? cacheBypassRequestHeaderNames, CachePolicyCacheKeyPolicy? cacheKeyPolicy, String? cacheMode, Duration? clientTtl, Duration? defaultTtl, Duration? maxTtl, bool? negativeCaching, List<CachePolicyNegativeCachingPolicy>? negativeCachingPolicy, bool? requestCoalescing, Duration? serveWhileStale})
CachePolicy.fromJson(Map json_)

Properties

cacheBypassRequestHeaderNames List<String>?
Bypass the cache when the specified request headers are matched by name, e.g. Pragma or Authorization headers.
getter/setter pair
cacheKeyPolicy CachePolicyCacheKeyPolicy?
The cache key configuration.
getter/setter pair
cacheMode String?
Specifies the cache setting for all responses from this route.
getter/setter pair
clientTtl Duration?
Specifies a separate client (e.g. browser client) maximum TTL for cached content.
getter/setter pair
defaultTtl Duration?
Specifies the default TTL for cached content for responses that do not have an existing valid TTL (max-age or s-maxage).
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
maxTtl Duration?
Specifies the maximum allowed TTL for cached content.
getter/setter pair
negativeCaching bool?
Negative caching allows per-status code TTLs to be set, in order to apply fine-grained caching for common errors or redirects. This can reduce the load on your origin and improve end-user experience by reducing response latency. When the cacheMode is set to CACHE_ALL_STATIC or USE_ORIGIN_HEADERS, negative caching applies to responses with the specified response code that lack any Cache-Control, Expires, or Pragma: no-cache directives.
getter/setter pair
negativeCachingPolicy List<CachePolicyNegativeCachingPolicy>?
Sets a cache TTL for the specified HTTP status code. negativeCaching must be enabled to configure negativeCachingPolicy. Omitting the policy and leaving negativeCaching enabled will use Cloud CDN's default cache TTLs.
getter/setter pair
requestCoalescing bool?
If true then Cloud CDN will combine multiple concurrent cache fill requests into a small number of requests to the origin.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
serveWhileStale Duration?
Serve existing content from the cache (if available) when revalidating content with the origin, or when an error is encountered when refreshing the cache. This setting defines the default "max-stale" duration for any cached responses that do not specify a max-stale directive.
getter/setter pair

Methods

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

Operators

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