TTL
Every frame carries a TTL (time-to-live) that sets how long the store keeps
it. The default is forever. A frame’s TTL is fixed when it is appended and
never changes afterward.
Kinds
| TTL | Query form | Meaning |
|---|---|---|
| Forever | forever (default) | Kept indefinitely. |
| Ephemeral | ephemeral | Never written to the store. Only readers following live at the moment of the append see it. |
| Time | time:<ms> | Kept for <ms> milliseconds after the frame’s creation, then removed. |
| Last | last:<n> | Retains only the newest n frames on the frame’s topic (n >= 1); older frames on that topic are removed. |
Setting a TTL
From Nushell, pass --ttl to .append:
"hello" | .append greeting # forever (default){tick: true} | .append clock --ttl ephemeral{level: "debug"} | .append logs --ttl time:60000 # 60s$state | .append game.score --ttl last:1 # keep only the latestOver HTTP, set the ttl query parameter on the append endpoint
(?ttl=last:1). The wire forms are exactly the query strings in the table
above.
How each kind behaves
foreveris the default, and the right choice for anything another part of the system reads back later.ephemeralframes are broadcast but never persisted, so they never appear in.cathistory or on replay. Use them for liveness signals where a missed frame does not matter.time:<ms>frames expire relative to their own creation timestamp.last:<n>schedules a per-topic garbage collection on each append: the store keeps thenmost recent frames on that topic and removes the rest. This is retention by topic, not by frame, so it affects every frame that shares the topic.