retention
A retention sweep: deletes rows older than a per-table age and stored objects past a per-prefix TTL, at most once a UTC day.
Built and tested in the harness, and not in the public repository yet. The install line and the source link appear here when it is.
What it is
retention.
Retention for stored data, in two halves. Rows: a sweep deletes rows older than a per-table age, comparing Unix-seconds integer columns and RFC 3339 text columns as instants. Blobs: a second sweep deletes stored objects older than a per-prefix TTL, unless the object is held. Both run from a scheduled handler once a UTC day, inside a fixed window of minutes, and both record each day they ran, so a second call the same day does nothing. Rows the comparison cannot read are kept and counted. SQLite and Cloudflare D1 only, and its migrations are applied by hand.
From the crate’s own README.
Ports
Database · Blob
History
Changelog.
Not released yet. Its changelog starts with its first release.
One of 95 crates in the harness, all of them MIT.