Correctness

Your cache is lying to you.

Every value read from a cache during a database transaction is data your database never validated. The transaction commits anyway. Serializable isolation, voided by a cache hit — no error, no log line, nothing to alert on. Swytch is the fix at the root: a cache with database-level consistency, so a cached read is as trustworthy as the database read it replaced.

# macOS / Linux (Homebrew)
brew tap swytchdb/tap
brew install swytch

Docker: ghcr.io/swytchdb/swytch

TX A TX B CACHE seats = 1 DATABASE bookings: 0
The impossible choice

Inside the transaction, after it, or evict — every option breaks.

Update the cache inside the transaction, and the write escapes isolation — other requests see state that hasn’t committed and may never commit. Update it after, and a crash between commit and cache write leaves the cache wrong forever. Evict instead, and the same window remains, now with a stampede attached. Frameworks that buffer cache writes until commit only move the window; they don’t close it.

The read side is worse, because it’s invisible: a serializable transaction that reads one cached value has made a decision the database never validated. Swytch closes the root cause. The cache itself carries database-level consistency — read-your-writes, deterministic order — so the value you read is one the system actually stands behind.

BEGIN;                        -- serializable
  price = cache.get("sku:1")  -- tainted: the DB
                              -- never saw this read
  INSERT INTO orders ...      -- decided on it anyway
COMMIT;                       -- “consistent” ✓

The database kept its promise. It just never saw the read that mattered.

The guarantees, precisely

Three properties, each one falsifiable. The TLA+ specs are public and the Jepsen suite is reproducible.

Read your writes
Read your writes

Effects you wrote are immediately visible where you wrote them. Causal time only moves forward: if A caused B and you’ve seen B, you’ve already seen A.

Bounded convergence
Bounded convergence

Any effect at node X reaches node Y within propagation delay — nothing more. There is no long-tail “eventual” window beyond the speed of the network.

Deterministic order
Deterministic order

Two nodes observing the same tip set produce bit-identical state. Same function, same inputs, same answer, at every node — no wall clock involved.

Don’t take the cache’s word for it.

The TLA+ specs are in the repository. The Jepsen suite reruns on your hardware. The paper is on arXiv. Verify, then deploy.

Found a cached read inside a transaction in your codebase? You’re not alone. Drop your address and we’ll send the write-up.