Record

write-options

Configuration for several functions that write to the cache:

record write-options {
  max-age-ns: duration-ns,
  request-headers: option​<borrow​<request>>,
  vary-rule: option​<string>,
  initial-age-ns: option​<duration-ns>,
  stale-while-revalidate-ns: option​<duration-ns>,
  surrogate-keys: option​<string>,
  length: option​<object-length>,
  user-metadata: option​<list​<u8>>,
  edge-max-age-ns: option​<duration-ns>,
  sensitive-data: bool,
  extra: option​<borrow​<extra-write-options>>,
}

Fields

NameTypeDescription
max-age-nsduration-nsthis is a required field
request-headersoption​<borrow​<request>>a full request handle, but used only for its headers
vary-ruleoption​<string>a list of header names separated by spaces
initial-age-nsoption​<duration-ns>The initial age of the object in nanoseconds (default: 0).
stale-while-revalidate-nsoption​<duration-ns>
surrogate-keysoption​<string>a list of surrogate keys separated by spaces
lengthoption​<object-length>
user-metadataoption​<list​<u8>>
edge-max-age-nsoption​<duration-ns>
sensitive-databool
extraoption​<borrow​<extra-write-options>>Additional options may be added in the future via this resource type.