Skip to content

v0.17.0 — cache

Choose a tag to compare

@tshafer tshafer released this 10 Jul 20:31
· 151 commits to main since this release

A small cache with TTLs and the remember pattern:

await cache().put("otp", code, 300);   // expires in 300s
const stats = await cache().remember("stats", 60, () => computeStats());

Also get / has / forget / pull / flush / rememberForever. Memory-backed by default; implement CacheStore to swap in Redis/KV. See docs/cache.md.