Record
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. |
| vary-rule | option<string> | A list of header names to use when calculating variants for this response. |
| initial-age-ns | option<duration-ns> | The initial age of the response in nanoseconds. |
| stale-while-revalidate-ns | option<duration-ns> | The maximum duration after max-age during which the response may be delivered stale
while being revalidated, in nanoseconds. |
| stale-if-error-ns | option<duration-ns> | The maximum duration after max-age during which the response may be delivered stale
if synchronous revalidation produces an error. |
| surrogate-keys | option<string> | A list of surrogate keys that may be used to purge this response. |
| length | option<object-length> | The length of the response body. |
| sensitive-data | bool | Enable or disable PCI/HIPAA-compliant non-volatile caching. |
| extra | option<borrow<extra-write-options>> | Additional options may be added in the future via this resource type. |