All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.1 - 2026-03-26
Slimmer default install and clearer optional extras. Behavior for a Redis server is unchanged once you install the redis extra (or full).
- Core dependencies are now
orjson,pyyaml,click, andtyping-extensionsonly.redisandfastapiare no longer installed by a plainpip install yokedcache. - Without
redis,YokedCache.connect()uses an in-process memory store so the same async API works for local scripts and tests without Redis. HTTPCacheMiddlewaredepends on Starlette only; installyokedcache[web](orfull). Docstrings use Starlette as the primary example.- New grouped extras in metadata:
redis,web,backends(disk + sqlite + memcached),observability(monitoring + tracing). Granular extras (memcached,disk,sqlite,monitoring,tracing, etc.) are unchanged.fullstill pulls the former “batteries included” set, includingredisandfastapi.
- Misleading
ImportErrorinyokedcache.__init__that always blamed Redis whenYokedCachefailed to import.
- README and getting-started emphasize multi-backend installs and extras.
- Documented the optional diskcache advisory (CVE-2025-69872 / GHSA-w8v5-vhqr-4h9v) in
SECURITY.md, the README Security section, the docs site Security page,CONTRIBUTING.md, and the GitHub bug report template (no patched upstream wheel at the time of writing; trust boundaries and mitigations).
If your project relied on transitive redis or fastapi from pip install yokedcache without listing them in your own requirements, add explicit dependencies or install:
pip install "yokedcache[redis]" for Redis, pip install "yokedcache[web]" for HTTP middleware, or pip install "yokedcache[full]" to approximate the old default footprint.
1.0.0 - 2026-03-23
First stable 1.x release. Published as 1.0.0 (not a PEP 440 pre-release) so a plain pip install yokedcache resolves to this line ahead of 0.x. Focus: security hardening, safer Redis usage, and clearer HTTP cache semantics.
- Replaced use of
eval()when loading vector metadata from Redis withorjson/ast.literal_eval, shape validation, andnumpy.dtypevalidation forRedisVectorSearch.get_vector. - Introduced a versioned binary envelope for cache values (
serialize_for_cache/deserialize_from_cache) so reads use a single deserialization path; avoids ambiguous JSON-then-pickle fallback on new payloads. - Added
CacheConfig.allow_legacy_insecure_deserialization(defaultTrue) to allow reading legacy unwrapped blobs during migration; set toFalsewhen Redis is strictly trusted and legacy entries are gone. - Documented that
HTTPCacheMiddlewaremust not cache per-user responses without a customkey_builder; default keys are only method + path (+ optional query).
serialize_for_cacheanddeserialize_from_cacheinyokedcache.utils(re-exported fromyokedcache).CacheConfig.max_single_flight_lockswith bounded LRU-style eviction for single-flight locks.HTTPCacheMiddlewareoptionalkey_builder(scope) -> strfor cache key control.redis_scan_keys,redis_scan_keys_max, andredis_delete_keyshelpers for non-blocking iteration and batched deletes.testshelpers and mocks updated for RedisSCAN(scan_iter) instead ofKEYS.
- Minimum Python is now 3.10 (was 3.9). Python 3.9 is EOL; raising the floor lets the lockfile use filelock ≥3.25.2 (fixes symlink / TOCTOU issues in older releases). Supported and CI-tested: 3.10–3.14. Python 3.9 installs should stay on
yokedcache==0.3.0(or any0.3.x); that line does not receive the 1.x security or dependency hardening—upgrade Python and yokedcache when you can (see docs site Getting started andSECURITY.md). - black 26.3.1 in dev / pre-commit (CVE-2026-32274: cache path handling).
- orjson minimum raised to ≥3.11.6 (addresses unbounded recursion in
loads/dumpson deeply nested JSON in earlier 3.x lines). - Redis pattern flush, invalidation, fuzzy key listing, and CLI
listuseSCAN/scan_iterinstead ofKEYS. - Long cache keys:
sanitize_keynow uses full-length SHA-256 for the hashed suffix (replacing truncated MD5). PrefixRouter.invalidate_patternselects the backend using the same longest-prefix rule asget_backend.- Memcached backend reads/writes use the same envelope helpers as Redis for consistency.
- In-memory Redis fallback (
_InMemoryRedis) implementsscan_iterfor compatibility with scan-based code paths. DiskCacheBackendcreates the thread pool onconnectand shuts down the executor ondisconnect.HTTPCacheMiddlewarenormalizesIf-None-Match(quoted tokens,*, comma-separated lists) for 304 handling.- Replaced stdlib
jsonwithorjsonfor JSON cache payloads, key hashing, decorators, vector metadata fields, and CLI--format jsonoutput; dependencyorjson>=3.11.6. Rationale:orjsonis a fast native-backed serializer, and these paths run on every JSON cache hit/miss and during key construction, so reducing serialization cost improves throughput versus pure-Pythonjson.
test_backends.TestMemcachedBackendskip condition: useMEMCACHED_AVAILABLEinstead of a brokendir()check so tests run whenaiomcacheis installed.- Integration fallback test: use
enable_memory_fallback,.invalidhost, andconnect()so assertions are deterministic withoutpytest.skip. - CLI and health-check tests: mock
scan_iterwhere the implementation usesredis_scan_keys_max/redis_scan_keys.
0.3.0 - 2025-08-26
- HTTP response caching middleware (ETag, Cache-Control, 304).
- Single-flight protection, stale-while-revalidate, stale-if-error.
- DiskCache and SQLite backends; per-prefix routing to multiple backends.
- OpenTelemetry hooks, cache metrics, optional dependency groups (
disk,tracing,full).
- SWR scheduler, prefix router, and extended
CacheConfigfor advanced features.
0.2.4 - 2025-11-02
- Implemented missing
_handle_tagsand related tag handling. - Replaced incorrect
CircuitBreakerOpenErrorreferences withCircuitBreakerError. - Removed duplicate / misplaced
YokedCachemethods (_direct_*, routing helpers); correctedselfusage. - Metrics: use
record_operation/OperationMetric; guard when metrics disabled. - Circuit breaker: async context manager support (
__aenter__/__aexit__).
0.2.3 - 2025-08-25
- Manual release workflow improvements (prerelease option, version checks).
CacheConfigversion retrieval and error handling; FastAPI example typing and errors.
- CI, Codecov, pre-commit, docs, and dependency maintenance.
0.2.1 - 2025-08-23
- Circuit breaker, connection pool tuning, retry with backoff, expanded metrics and health reporting.
- Sync/async cache method variants and improved
cached_dependencyfor FastAPI generators. - Timezone-aware datetimes in serialization paths.
connection_pool_kwargsvalidation; sync-in-async Task issues; generator dependencies; env override parsing; mypy and Windows test stability.
0.2.0 - 2024-01-15
- Pluggable backends (Redis, Memcached, memory), vector similarity search, Prometheus/StatsD hooks, CSV CLI export, LRU memory backend.
- Refactored cache around backend abstraction; expanded configuration and documentation.
- Timezone-aware
datetimeusage; optional import fallbacks; vector Manhattan distance; async test stability.
0.1.3 - 2025-08-22
python -m yokedcacheentry point; full CLI command set; documentation updates.
- CLI architecture and GitHub Actions reliability.
- Redis async close compatibility; async CLI registration; formatting and typing fixes.
- Codecov integration (temporary) due to rate limits.
0.1.2 - 2025-08-22
- Initial public structure: Redis caching, invalidation, tags, patterns, fuzzy search, FastAPI integration, YAML config, CLI, metrics, serialization options, async API, pooling, tests, docs, examples, pre-commit, CI.
0.1.0 - 2024-01-01
- Initial release: core Redis cache, FastAPI-oriented usage, CLI, configuration, baseline documentation.