Record

set-options

Options that modify the behavior of a set operation.

record set-options {
  ttl-ms: option​<u64>,
  if-not-exists: bool,
}

Fields

NameTypeDescription
ttl-msoption​<u64>If set, the entry expires this many milliseconds after the write, after which the host removes it. none stores the entry without expiry.
if-not-existsboolWhen true, the write succeeds only if the key does not already exist, failing with error::precondition-failed otherwise. Useful for locks and idempotent initialization.