ttlMs property
int
get
ttlMs
A hint for how long, in milliseconds, the client may cache this response
before re-fetching, analogous to HTTP Cache-Control max-age.
A value of 0 marks the response as immediately stale.
Servers on protocol versions before 2026-07-28 omit the field; the spec says clients should assume 0 in that case, and should treat a negative value from a non-conforming server as 0, so both are reported here as 0.
Implementation
int get ttlMs {
final value = _value[Keys.ttlMs] as int? ?? 0;
return value < 0 ? 0 : value;
}