Skip to content

v0.25.0

Choose a tag to compare

@cachekit-release-bot cachekit-release-bot released this 28 Oct 08:53
fe2536b

0.25.0 (2026-10-28)

⚠ BREAKING CHANGES

  • config: cachekit.config.nested.CircuitBreakerConfig.validate(), which DecoratorConfig runs, now raises ConfigurationError, and cachekit.reliability.CircuitBreakerConfig (exported as the top-level cachekit.CircuitBreakerConfig) now raises ValueError, unless each of failure_threshold, success_threshold and half_open_requests is an int or a NumPy integer scalar, not a bool, and >= 1. Before, the decorator config refused a count only when value < 1 and the top-level class only when value <= 0, so these used to pass and are now refused: a float such as 5.0 (in the top-level class also 0.5), a Decimal such as Decimal(5), a Fraction such as Fraction(5) (in the top-level class also Fraction(1, 2)), a bool, a NumPy bool scalar, NaN, inf, a np.timedelta64, and a 0-d or one-element NumPy array; pass an int. recovery_timeout / timeout_seconds must now be an int, a float, a Fraction or a NumPy integer or float scalar, not a bool, finite and > 0; a bool, a NumPy bool scalar, a Decimal, a 0-d or one-element NumPy array, and a np.timedelta64 that is unitless or in ns, M or Y units, which passed before when positive and finite, are now refused (a timedelta in other units, or NaT, used to raise TypeError and now raises the class's error). BackpressureConfig.validate() now refuses a 0-d integer NumPy array, which passed before, for max_concurrent_requests, queue_size and timeout, and an object with __index__ that is not a numbers.Integral for all three.
  • cachekit.monitoring.CircuitBreakerProtocol now requires a get_stats() -> dict method instead of the state, failure_count, success_count and last_failure_time properties. The dict holds state (the upper-case state name: "CLOSED", "OPEN" or "HALF_OPEN"), failure_count, success_count and last_failure_time (epoch seconds of the last counted failure, 0.0 before the first). HealthChecker reads a circuit breaker only through get_stats(), and a state it does not recognise now reports UNHEALTHY instead of falling through to HEALTHY. cachekit.reliability.CircuitBreaker already implements the method. BackpressureConfig.queue_size and timeout now take effect. BackpressureConfig.validate(), which DecoratorConfig runs, raises ConfigurationError when max_concurrent_requests or queue_size is not a whole number >= 1 (a bool, a float or NaN included), or when timeout is not an int or float from 0 to threading.TIMEOUT_MAX (None, a str, a bool, a Decimal, a Fraction or NaN included). Those queue_size and timeout values were previously accepted and ignored, and such a max_concurrent_requests was accepted and disabled the limit.

Features

  • build: publish a free-threaded CPython 3.15 wheel (LAB-10969) (#638) (c9794b4)
  • build: publish CPython 3.15 wheels (LAB-10967) (#633) (2f9a661)
  • decorators: opt-in write_behind returns a miss before its L2 write lands (LAB-7161) (#623) (cbf4e85)
  • decorators: share one trip for concurrent sync backed misses (LAB-8457) (#655) (258bd77)
  • drop Python 3.10 support, require >=3.11 (LAB-10968) (#637) (2911337)

Bug Fixes

  • config: name the accepted types in the timeout messages (LAB-10984) (#634) (4188c1c)
  • config: refuse non-whole circuit-breaker thresholds and non-numeric timeouts (LAB-10531) (#631) (c87f83b)
  • deps: floor filelock at 4.2.1 on Python 3.11+ for pip-audit (LAB-10807) (#629) (234e3e2)
  • make: remove the pytest base temp after a passing test run (LAB-11059) (#642) (2e7443e)
  • perf: wake the instruction-budget gate's wait so a signal is never slept through (LAB-10970) (#641) (f930482)
  • readme: replace the unmeasured performance figures with measured ones (LAB-10638) (#622) (9d00c5e)
  • redis: replace deprecated setex with set(ex=) (LAB-11029) (#651) (6b18341)
  • redis: run on redis-py 8: invalidation listener and RESP3 error-frame tests (LAB-10979) (fcd7f27)
  • security: make security-medium mirror the Security Medium workflow (LAB-10606) (#621) (60c5182)
  • serializers: count empty collections toward the nesting bound; the guard's ValueError replaces msgpack's StackError (LAB-6485) (#618) (39320e5)
  • six defects in health checks, backpressure wiring and serializer and breaker docs (LAB-10106) (#615) (a46c9c1)

Performance Improvements

  • decorators: memoise generated keys and serve L1-only hits on a fast path (LAB-10663) (#625) (75440ff)
  • deps: bump cachekit-core to 0.7.2 (LAB-11012) (#654) (0b8aa83)
  • deps: update cachekit-core to 0.7.1 (LAB-10985) (#636) (c8ddc7d)
  • encryption: precompute the AAD prefix and bind the keyring to the tenant (LAB-7126) (#644) (986ed04)
  • encryption: read decrypt ciphertext from any buffer without a bytes() copy (LAB-7127) (#647) (ffa8cc0)