Replayable Systems
Reconstruct any system state at any point in time. Every transition hash-chained.
What was the value of key X at time T? Answer: 31 nanoseconds.
A replayable system can reconstruct any state at any point in time. Every state transition — every SET, UPDATE, DELETE — is recorded in a hash-chained audit log. Replay only works if you have a tamper-proof audit trail. Every version of every key is preserved. The system can answer "what was the value of key X at time T?" for any key and any time. This is not event replay (rebuilding state from a log). This is direct version lookup — the historical state is stored and accessible at 31 nanoseconds.
Three Reasons You Need State Replay
A regulator asks: "What was the account balance at 3:47 PM on March 15?" A developer asks: "What data was in production when the bug occurred?" An auditor asks: "Prove the state at the time of this transaction." All three require the same capability: reconstructing past state.
- Compliance — SEC Rule 17a-4, MiFID II, and SOX Section 404 require the ability to reconstruct historical state on demand. Not "we have logs." Actual state values at actual timestamps.
- Debugging — Production bugs are caused by specific data in specific states. Without replay capability, you cannot reproduce the exact conditions. With it, you can reconstruct the exact state that caused the failure.
- Auditing — Financial auditors require transaction replay. Healthcare auditors require access replay. Security auditors require incident reconstruction. All require time-travel queries.
State at Any Point in Time
Every key maintains a complete version history. Query any version at any timestamp.
account:balance_4821 — Temporal Version History
Every version is hash-chained to the previous. No version can be retroactively inserted or modified.
Event Sourcing vs CQRS vs Cachee
| Property | Event Sourcing | CQRS | Cachee Audit Chain |
|---|---|---|---|
| State Reconstruction | Replay events (slow) | Read model (separate) | Direct lookup (31ns) |
| Storage Cost | All events forever | Events + projections | Versions + hash chain |
| Query Historical State | Replay to time T | Only if projected | GET key --at T (31ns) |
| Tamper Evidence | None (append-only trust) | None | SHA3-256 hash chain |
| Complexity | Event handlers, projections, snapshots | Command/query split | One library, automatic |
| Schema Evolution | Event versioning needed | Projection rebuild | Values stored directly |
| PQ Signatures | Not available | Not available | 3 families per version |
Event sourcing gives you replay at the cost of complexity and rebuild time. Cachee gives you the same time-travel capability with direct version lookup — no events to replay, no projections to maintain, no snapshots to manage. Every replay is grounded in verifiable computation results. Every version is a first-class value stored at 31ns.
Event Replay vs Direct Version Lookup
State Reconstruction Speed
The AUDITLOG Command
The AUDITLOG command reconstructs the full lifecycle of any key: every version, every state transition, every actor who modified it, every timestamp. The result is a hash-chained sequence of records that can be independently verified.
// Full lifecycle of a key
AUDITLOG account:balance_4821
// Lifecycle since a specific date
AUDITLOG account:balance_4821 SINCE 2026-04-01
// Lifecycle filtered by actor
AUDITLOG account:balance_4821 ACTOR system:wire_transfer
// Point-in-time query
GET account:balance_4821 --at 2026-05-02T15:47:00Z
// Diff between two points in time
DIFF account:balance_4821 --from T-3h --to T-now
Unlike grep-based log search, AUDITLOG returns structured, cryptographically-linked records. Every record is PQ-signed. Every transition is hash-chained to the previous. The audit trail itself is tamper-proof.
Temporal Versioning Internals
Every key in Cachee maintains a version index — a time-ordered list of all versions. When a key is updated, the previous value is not overwritten. Instead, a new version is created with a hash-chain link to the previous version.
// Internal version chain for account:balance_4821
version_index = [
{ seq: 1, ts: "T-3h", hash: SHA3-256(v1_data || genesis), val: 12450.00 },
{ seq: 2, ts: "T-2h", hash: SHA3-256(v2_data || v1_hash), val: 11950.00 },
{ seq: 3, ts: "T-45m", hash: SHA3-256(v3_data || v2_hash), val: 14200.00 },
{ seq: 4, ts: "T-10m", hash: SHA3-256(v4_data || v3_hash), val: 14175.00 },
{ seq: 5, ts: "T-now", hash: SHA3-256(v5_data || v4_hash), val: 14675.00 },
]
// Point-in-time query: binary search on timestamp
GET key --at T-45m // binary search -> seq:3 -> return v3 (31ns)
The version index is itself hash-chained. No version can be retroactively inserted — inserting between v2 and v3 would require recomputing v3's hash (which includes v2's hash), which would require recomputing v4's hash, and so on. The chain is tamper-evident by construction.
Point-in-time queries use binary search over the version index — O(log N) complexity. For a key with 1,000 versions, the lookup touches at most 10 entries. For 1,000,000 versions, 20 entries. The result is always returned in nanoseconds, regardless of version depth.
Run it yourself: brew install cachee && cachee replay-demo
Where Replayable Systems Matter
Get Started
brew tap h33ai-postquantum/tap && brew install cachee
cachee init && cachee start
# Every SET automatically creates a versioned entry
SET account:balance_4821 12450.00
SET account:balance_4821 11950.00
# Query historical state at any point
GET account:balance_4821 --at 2026-05-02T12:00:00Z
# Full audit trail with hash chain verification
AUDITLOG account:balance_4821
# Diff between two points in time
DIFF account:balance_4821 --from T-1h --to T-now
Temporal versioning is automatic. Every SET preserves the previous value and creates a hash-chain link. No configuration needed. No event store to manage. No projections to maintain. Every key is replayable by default. This is what makes the system verifiable audit infrastructure.
Reconstruct any state. At any time. In 31 nanoseconds. Cryptographically proven.
Install Cachee Audit Trail ArchitectureDeep Dives
Explore Verifiable Computation Infrastructure
Every page in the Cachee knowledge base. Proven computation, not cached data.
The category definition. Run computation once, serve forever. →Tamper-Proof Audit Trails
SHA3-256 hash-chained immutable logging. →Cache Attestation
Signed cache entries. Three PQ families per SET. →Computation Fingerprinting
Identity for results. Provenance, not just output. →Data Lineage Verification
Prove where your data came from. →Compliance-Ready Infrastructure
Pass audits without slowing down.