Customize how and when content is cached.

Hierarchy

  • Caching

Indexable

[k: string]: unknown

Properties

allow_empty_query_in_cache_key?: boolean

Reserved for future use.

bandwidth_throttling?: {
    execute_on_shield?: boolean;
    kbytes_per_sec: number;
    prebuf_seconds?: number;
}

Throttles the bandwidth for the response provided by our edge servers.

Type declaration

  • Optional execute_on_shield?: boolean
  • kbytes_per_sec: number

    The maximum bandwidth (Kb per second) that may be used to deliver the response.

  • Optional prebuf_seconds?: number

    The number of seconds that our edge servers will wait until throttling bandwidth.

bypass_cache?: boolean

Determines whether our CDN will honor your caching policy when determining whether requests should be cached.

bypass_client_cache?: boolean | {
    execute_on_shield: boolean;
    value: boolean;
}

Determines whether our CDN will instruct the client to bypass cache. Sets the cache-control response header to: cache-control: private, no-cache, no-store, must-revalidate.

cache_control_header_treatment?: HeaderTreatment | {
    execute_on_shield: boolean;
    value: HeaderTreatment;
}

Controls the generation of Cache-Control headers by an edge server when the client_max_age feature is active.

cache_key?: {
    exclude_all_query_params?: boolean;
    include_all_query_params?: boolean;
    include_all_query_params_except?: [string, ...string[]];
    include_cookies?: [string, ...string[]];
    include_expressions?: [string, ...string[]];
    include_headers?: [string, ...string[]];
    include_hostname?: true;
    include_query_params?: [string, ...string[]];
}

Customizes the cache key through query string parameters, request headers, cookies, and custom metadata.

Type declaration

  • Optional exclude_all_query_params?: boolean

    All query string parameters will be excluded from the cache key.

  • Optional include_all_query_params?: boolean

    A unique cache key will be created for each request to an asset that includes a unique query string.

  • Optional include_all_query_params_except?: [string, ...string[]]

    Contains the set of parameter(s) will be excluded from the cache key. All other query string parameters will be included in the cache key.

    Min Items

    1

  • Optional include_cookies?: [string, ...string[]]

    Contains the set of cookie(s) that may be included in the cache key.

    Min Items

    1

  • Optional include_expressions?: [string, ...string[]]

    Contains custom content that may be included in the cache key. This content may consist of static text and feature variables.

    Min Items

    1

  • Optional include_headers?: [string, ...string[]]

    Contains the set of request header(s) that may be included in the cache key.

    Min Items

    1

  • Optional include_hostname?: true

    Determines whether the cache key will include the hostname.

  • Optional include_query_params?: [string, ...string[]]

    Contains the set of parameter(s) that may be included in the cache key. A unique cache key will be generated for each request that contains a unique value for a query string parameter defined in this feature.

    Min Items

    1

cache_key_query_string?: {
    exclude_all?: boolean;
    include?: string[];
    include_all?: boolean;
    include_all_except?: string[];
}

Determines whether the cache key will include or exclude query string parameters associated with a request.

Type declaration

  • Optional exclude_all?: boolean

    Excludes all query string parameters from the cache key.

  • Optional include?: string[]

    The set of query string parameter(s) that may be included in the cache key.

  • Optional include_all?: boolean

    Includes all query string parameters within the cache key. A unique cache key will be created for each request to an asset that includes a unique query string.

  • Optional include_all_except?: string[]

    The set of query string parameter(s) that will be excluded from the cache key. All other query string parameters can be included in the cache key.

cache_key_rewrite?: RegexRewrite
cacheable_request_body_size?: string

Restricts caching to requests whose body does not exceed the specified file size.

cacheable_status_codes?: HttpStatusCode[]

Defines the set of status codes that can result in cached content.

client_max_age?: string | {
    execute_on_shield: boolean;
    value: string;
}

Determines the max-age interval for browser to edge server cache revalidation. In other words, the amount of time that will pass before a browser can check for a new version of an asset from an edge server.

default_internal_max_age?: string | {
    [k: string]: TimeIntervalNegative;
}
enable_caching_for_methods?: ("GET" | "POST" | "PUT")[]

Determines whether POST and PUT requests are eligible for caching on our network.

expires_header_treatment?: HeaderTreatment | {
    execute_on_shield: boolean;
    value: HeaderTreatment;
}

Determines how an edge server will handle the Expires response header when the client_max_age feature is active. This feature overrides the Expires header generated by the client_max_age feature.

first_hit_caching?: boolean

Reserved for future use.

h264_support?: string[]

Reserved for future use.

h264_support_video_seek_params?: {
    seek_end?: string;
    seek_start: string;
}

Reserved for future use.

Type declaration

  • Optional seek_end?: string
  • seek_start: string
honor_no_cache_request_header?: boolean

Determines whether an HTTP client’s no-cache requests will be forwarded to the origin server. A no-cache request occurs when the HTTP client sends a Cache-Control:no-cache, Pragma:no-cache header, or both in the HTTP request.

ignore_origin_no_cache?: HttpStatusCode[]

Determines on a per HTTP status code basis whether our CDN will ignore Cache-Control: private, Cache-Control: no-store, Cache-Control: no-cache, and Pragma: no-cache cache directives served from an origin server.

ignore_unsatisfiable_ranges?: boolean

Determines the response that will be returned to clients when a request generates a 416 Requested Range Not Satisfiable status code. By default, this status code is returned when the specified byte-range request cannot be satisfied by an edge server and an If-Range request header field was not specified.

max_age?: string | {
    [k: string]: TimeIntervalNegative;
}
partial_cache_sharing_min_hit_size?: number

Defines the minimum file size (bytes) for caching partial content.

prevalidate_cached_content?: string

Determines whether cached content will be eligible for early revalidation before its TTL expires. Define the amount of time prior to the expiration of the requested content’s TTL during which it will be eligible for early revalidation.

purge_tags?: [string] | [string, string] | [string, string, string] | [string, string, string, string] | [string, string, string, string, string] | [string, string, string, string, string, string] | [string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string] | [string, string, string, string, string, string, string, string, string, string]

Tunes your caching configuration to add cache tags / surrogate key for purging purposes.

Min Items

1

Max Items

10

refresh_zero_byte_cache_files?: boolean

Determines how an HTTP client’s request for a 0-byte cache asset is handled by our edge servers.

revalidate_after_origin_unavailable?: string | {
    [k: string]: TimeInterval;
}
revalidate_while_stale_timer?: number

Determines how often, in seconds, the system will attempt to connect to an unavailable origin server.

service_worker_max_age?: string

Set the amount of time that must pass before a browser can check for a new version of a prefetched request. Specifically, it determines the max-age interval for the Prefetch service worker to edge server cache revalidation.

stale_on_error?: boolean

Determines whether expired cached content will be delivered when an error occurs during cache revalidation or when retrieving the requested content from an origin server.

stale_while_revalidate?: string

Improves performance by allowing our edge servers to serve stale content while revalidation takes place.

streaming_optimization?: boolean

Tunes your caching configuration to optimize performance for live streams and to reduce the load on the origin server.

Generated using TypeDoc