Skip to content

This release adds 8 notable features for engineering teams evaluating rollout.

Published 17d Caching
✓ No known CVEs patched
Read the diff → Tool health → What is this tool? →

✓ No known CVEs patched in this version

Topics

cache-manager cache memory-cache multi-layer-cache nodejs redis
+2 more
stampede-prevention typescript

Summary

AI summary

Added cacheNullValues, CacheStack.getEntry(), captureMetrics, shared circuit breaker scope, queueOverflow policy, DiskLayer write‑queue limit, and several performance improvements.

Changes in this release

Feature Medium

`cacheNullValues` stores fetched null values as regular cache values.

`cacheNullValues` stores fetched null values as regular cache values.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Feature Medium

`CacheStack.getEntry()` exposes entry metadata (`kind`, `state`, `layer`).

`CacheStack.getEntry()` exposes entry metadata (`kind`, `state`, `layer`).

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Feature Medium

`CacheStack.captureMetrics()` returns operation result plus emitted metrics.

`CacheStack.captureMetrics()` returns operation result plus emitted metrics.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Feature Medium

Shared circuit breaker scope groups related fetches by backend dependency.

Shared circuit breaker scope groups related fetches by backend dependency.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Feature Medium

`queueOverflow` rate-limit policy can be set to `'reject'` or `'bypass'`.

`queueOverflow` rate-limit policy can be set to `'reject'` or `'bypass'`.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Feature Medium

`DiskLayer.maxWriteQueueDepth` bounds serialized disk write queue.

`DiskLayer.maxWriteQueueDepth` bounds serialized disk write queue.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: low

Performance Low

TagIndex repeated touches are throttled via 'touchRefreshIntervalMs' to reduce LRU churn.

TagIndex repeated touches are throttled via 'touchRefreshIntervalMs' to reduce LRU churn.

Source: granite4.1:30b@2026-05-21-audit

Confidence: low

Performance Low

Distributed single‑flight waiters back off polling while respecting the configured timeout.

Distributed single‑flight waiters back off polling while respecting the configured timeout.

Source: granite4.1:30b@2026-05-21-audit

Confidence: low

Bugfix Medium

Circuit breaker buckets are namespaced to prevent id collisions.

Circuit breaker buckets are namespaced to prevent id collisions.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Bugfix Medium

`getEntry()` records read metrics, touches tag metadata, backfills faster layers, and emits events consistently.

`getEntry()` records read metrics, touches tag metadata, backfills faster layers, and emits events consistently.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Bugfix Medium

Enum-like runtime validation rejects empty-string `scope` and `queueOverflow` values.

Enum-like runtime validation rejects empty-string `scope` and `queueOverflow` values.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: low

Refactor Medium

TagIndex wildcard matching prunes candidates by literal prefix and uses iterative traversal.

TagIndex wildcard matching prunes candidates by literal prefix and uses iterative traversal.

Source: granite4.1:8b-q6_K@2026-05-21

Confidence: high

Refactor Medium

Namespace metrics use async‑local capture and preserve metrics from thrown operations.

Namespace metrics use async‑local capture and preserve metrics from thrown operations.

Source: granite4.1:30b@2026-05-21-audit

Confidence: low

Full changelog

What's New in 3.1.0

Added

  • cacheNullValues — store fetched null values as regular cache values instead of treating them as misses or negative-cache entries.
  • CacheStack.getEntry() — exposes entry metadata (kind, state, layer) so callers can distinguish stored null values, negative-cache entries, stale entries, and misses.
  • CacheStack.captureMetrics() — runs an async operation and returns the result plus only the metrics emitted during that operation.
  • Shared circuit breaker scopescope: 'shared' and breakerKey group related fetches by backend dependency instead of only by cache key.
  • queueOverflow rate-limit policy'reject' (default) or 'bypass' makes saturated fetcher queues fail explicitly instead of silently bypassing.
  • DiskLayer.maxWriteQueueDepth — bounds the serialized disk write queue (default 10,000, disable with false).

Changed

  • TagIndex wildcard matching now prunes candidates by literal prefix and uses iterative traversal, eliminating recursive depth limits.
  • TagIndex repeated touches are throttled with touchRefreshIntervalMs to reduce hot-path LRU churn.
  • Namespace metrics use async-local capture and preserve metrics from operations that throw.
  • Distributed single-flight waiters back off polling while respecting the configured timeout.

Fixed

  • Circuit breaker buckets are namespaced internally so per-key, shared, and custom breaker ids cannot collide.
  • Enum-like runtime validation rejects empty-string scope and queueOverflow values.
  • getEntry() records read metrics, touches tag metadata, backfills faster layers, and emits events consistently with the normal read path.

Full Changelog: https://github.com/flyingsquirrel0419/layercache/compare/v3.0.0...v3.1.0

Weekly OSS security release digest.

The CVE patches and breaking changes that affected production tools this week. One email, every Sunday.

No spam, unsubscribe anytime.

Share this release

Track flyingsquirrel0419/layercache

Get notified when new releases ship.

Sign up free

About flyingsquirrel0419/layercache

All releases →

Related context

Related tools

Beta — feedback welcome: [email protected]