write-options
Options for cache insertions and updates.
record write-options {
max-age-ns: duration-ns,
vary-rule: option<string>,
initial-age-ns: option<duration-ns>,
stale-while-revalidate-ns: option<duration-ns>,
stale-if-error-ns: option<duration-ns>,
surrogate-keys: option<string>,
length: option<object-length>,
sensitive-data: bool,
extra: option<borrow<extra-write-options>>,
}Fields
| Name | Type | Description |
|---|---|---|
| max-age-ns | duration-ns | The maximum age of the response before it is considered stale, in nanoseconds. This field is required. |
| vary-rule | option<string> | A list of header names to use when calculating variants for this response. The format is a string containing header names separated by spaces. |
| initial-age-ns | option<duration-ns> | The initial age of the response in nanoseconds. If this field is not set, the default value is zero. This age is used to determine the freshness lifetime of the response as well as to prioritize which variant to return if a subsequent lookup matches more than one vary rule |
| stale-while-revalidate-ns | option<duration-ns> | The maximum duration after If this field is not set, the default value is zero. |
| stale-if-error-ns | option<duration-ns> | The maximum duration after If this field is not set, the default value is zero. |
| surrogate-keys | option<string> | A list of surrogate keys that may be used to purge this response. The format is a string containing valid surrogate keys separated by spaces. If this field is not set, no surrogate keys will be associated with the response. This means that the response cannot be purged except via a purge-all operation. |
| length | option<object-length> | The length of the response body. If this field is not set, the length of the body is treated as unknown. When possible, this field should be set so that other clients waiting to retrieve the
body have enough information to synthesize a |
| sensitive-data | bool | Enable or disable PCI/HIPAA-compliant non-volatile caching. See the Fastly PCI-Compliant Caching and Delivery documentation for details. |
| extra | option<borrow<extra-write-options>> | Additional options may be added in the future via this resource type. |