TriFrost

TriFrost 0.15.0

|peterver

News

This release brings further resilience, structure, and flexibility to TriFrost’s storage layer — turning what was already powerful into something even more durable (pun intended).

Added

  • feat: Prefix deletion support in all TriFrost storage backends (DurableObject, Memory, Redis, KV). This enables scoped deletion of key groups across the unified .del() API. Since ctx.cache is backed by TriFrost storage, you can now do:
await ctx.cache.del({prefix: 'somekey_'}); /* Deletes all keys with prefix 'somekey_' */
  • feat: Prefix deletion support in the TriFrost cookies module:
ctx.cookies.del({prefix: 'somekey_'}); /* Deletes all cookies with prefix 'somekey_' */

Improved

  • feat: TriFrost now supports context-aware cache spawning via a new internal .spawn() mechanism on both Store and Cache. When a request comes in, TriFrost automatically creates a scoped cache instance bound to the request’s lifecycle. This lets system errors be logged per-request — and paves the way for future auto-instrumentation 🧙‍♂️
  • qol: All StoreAdapter classes (Memory, Redis, KV, DurableObject) now follow a clean, centralized interface — enabling future adapters with zero boilerplate
  • qol: TriFrost’s storage backends (Redis, KV, DurableObject) now fail gracefully. If Redis goes down, errors are swallowed (and logged via ctx.logger.error) — no more bubbling runtime crashes.
  • misc: Internal file restructure — all storage logic now lives in lib/storage, making adapters easier to extend, test, and discover
  • misc: CICD tagged releases will now also automatically purge the cache on the TriFrost Website
  • deps: Upgrade @cloudflare/workers-types to 4.20250522.0
  • deps: Upgrade @types/node to 22.15.21
  • deps: Upgrade bun-types to 1.2.14

🧙 Note: While .spawn() might sound like an advanced or manual step, it’s entirely internal. As a developer, you don’t need to think about it — TriFrost handles everything behind the scenes. In most cases, you’ll never call .spawn() yourself. It’s there to make the system smarter, not more complex.

Loved the read? Share it with others