Validate and ceil an adapter-level write TTL to the protocol's acceptance domain: fractional milliseconds round up, and the result must be a positive integer no greater than 365 days. Native SET PX requires an integer. Core separately caps tracked Redis values at one hour.
Public frame protocol surface for adapter authors and out-of-band tooling.
These exports encode and decode complete frames, validate mutation replies, guard the write-TTL acceptance domain, and carry the invalidation Lua source the bundled adapters dispatch. The invalidation script accepts
[futureBufferMs, invalidatedAtMs]; both are nonnegative safe integers, and the application-clock timestamp must remain stable through one logical dispatch and its recovery. The payload region past the header is opaque at this layer: entries written by DialCache releases with payload compression may begin with a compression envelope byte (0x00 escape, 0x01/0x02 zstd; see docs/redis.md, Compression), which DialCache core interprets above the adapter. Adapters must never decompress or otherwise rewrite payload bytes.