Cross-posted from the Centrali blog . The canonical version with code highlighting and updates lives there. TL;DR: Record TTL (time-to-live) is a database feature that automatically deletes records once they expire. You set an expiration time on a record — by duration ("delete in 1 hour") or by timestamp ("delete on March 1") — and the database removes it without a cron job. This is database TTL; it's the same idea as DNS TTL but applied to rows in a table instead of cached DNS lookups. A note before we go further: if you searched for "TTL" and ended up here looking for DNS TTL (how long a DNS resolver caches an A/AAAA/CNAME record), this isn't that post — try Cloudflare's DNS TTL reference . This post is about record TTL in databases : making rows in your data store auto-delete on a schedule. What Is Record TTL? Record TTL is a per-record expiration time.…