Skip to content

Releases: kemalcr/kemal-cache

v1.2.0

04 Apr 07:02

Choose a tag to compare

  • Added fail-open handler behavior for store get, set, and corrupt-payload delete errors so cache backend failures do not break otherwise successful requests.
  • Added observable StoreError events and stats.store_errors counters for cache backend failures.
  • Added non-raising try_invalidate and try_clear_cache helpers for operational cache management.
  • Added Config#ttl_resolver for per-route and per-cache-key TTL selection, with nil falling back to expires_in.
  • Added optional Config#max_ttl to clamp resolved and fallback TTL values to a configured upper bound.
  • Added opt-in, process-local cache stampede protection via collapse_concurrent_misses.
  • Added fail-fast validation to reject non-positive expires_in values.
  • Added validation to reject zero and negative resolved TTL values.
  • Added validation to reject non-positive max_ttl values.

v1.1.0

03 Apr 05:35

Choose a tag to compare

  • Made Redis support opt-in via require "kemal-cache/redis" so the core middleware can be used without a runtime Redis dependency.
  • Switched RedisStore#clear from KEYS to cursor-based SCAN iteration.
  • Invalidates corrupt cached payloads and falls back to a cache miss instead of failing the request.
  • Added an optional MemoryStore entry cap with oldest-entry eviction.
  • Added a distinct disabled bypass reason and clarified stats semantics for cacheable requests and 304 Not Modified hits.
  • Preserves headers set before the cache handler on cache hits unless the cached response replaces that header name.

v1.0.0

02 Apr 18:18

Choose a tag to compare

Initial stable release of kemal-cache.

  • Production-ready response caching middleware for Kemal.
  • Safe-by-default cache behavior for authenticated, cookie-bearing, and non-cacheable responses.
  • Successful 2xx responses cached by default.
  • MemoryStore as the default in-process backend.
  • Built-in RedisStore backed by jgaskins/redis.
  • Configurable cache keys with key_generator.
  • Configurable cache methods and status-code policies.
  • Request and response filters with skip_if and should_cache.
  • Cache invalidation APIs with invalidate(key), invalidate(context), and clear_cache.
  • Response size guards with max_body_bytes.
  • Streaming guards with cache_streaming.
  • Automatic ETag and Last-Modified generation for cached responses.
  • Conditional GET support with If-None-Match, If-Modified-Since, and 304 Not Modified.
  • Built-in observability with Stats, Event, EventType, and on_event.