Repository navigation
v0.3.0
⚠️ Breaking
ddredis.decoratorsis removed.GenericCachesuppressesRedisErrorthroughsafe_call(default_result=None, exceptions=(RedisError,), capture_exception=False)from ddutils 0.4, which handles coroutine functions, and keeps the decorator private. Code that importedsuppress_redis_errorsusesddutils.safe_decorators.safe_callwith the same arguments.- Requires
redis >= 6, < 9. The README documents the client's default retries (3 attempts with exponential backoff and jitter), which redis-py has since 6.0; 5.x retried once without a pause, so the documented productioncreate_funcdid not do what it said there. The CI matrix now tests redis 6, 7 and 8. - Requires
ddutils >= 0.4.0, < 0.5.0.
🔄 Changed
- The
GenericCachedocstring no longer claims msgspec compatibility: aStructhas neithermodel_validate_jsonnormodel_dump_json. Its example wires the client registry withprocess_loop_scopefrom ddutils 0.4.0.
📝 Docs
- GenericCache: the checks at class definition, the key format
:<snake_case_domain>:<key>,get_list/delete_by_filtersasSCAN MATCHover the whole keyspace, an entry that does not deserialize reads as a miss, the jitter isttl // 10and so zero under 10 seconds, the client may run with or withoutdecode_responses. - RedisLock: the full signature
RedisLock(client_factory, key, timeout=10.0, blocking=False, *, alias=None), the token-only design that borrows the client for every call,keystored as given,AlreadyAcquiredErroralso when a blocking wait runs out, not reentrant but reusable afterrelease(),extend()on an expired key raises redis-py'sLockNotOwnedErrorand either withoutacquire()raisesLockError. - RedisFeatureFlagStorage: the signature with
aliasandkey, the JSON record format, the strict parsing (an extra key is as malformed as a wrong value), a malformed record reads as the defaults and so disables its flag,get_mapkeeps the valid records. - The layout follows dd-lib-stub, with a Compatibility section.
Full Changelog: v0.2.0...v0.3.0