TriFrost

TriFrost 0.4.0

|peterver

News

Improved

  • feat: ctx.setHeader now accepts number values and will coerce them to strings internally.
  • feat: ctx.setHeaders now accepts number values in the object and coerces them to strings.
  • feat: Passing max_items as null to MemoryCache will now disable the LRU added in trifrost 0.3.0. For example:
/* Capped to 500 entries */
new MemoryCache({max_items: 500});

/* (NEW) Unbounded, no LRU eviction */
new MemoryCache({max_items: null});
  • perf: Improved ctx.ip resolution when trustProxy is enabled: the header containing a valid IP is now promoted to the front of the candidate list for future lookups, improving subsequent request performance.
  • misc: RedisRateLimit, KVRateLimit and DurableObjectRateLimit will now throw if not called with a store initializer
  • deps: Upgrade @types/node to 22.15.17
  • deps: Upgrade @cloudflare/workers-types to 4.20250510.0

Loved the read? Share it with others