Skip to content

v0.3.0

Choose a tag to compare

@github-actions github-actions released this 19 Oct 18:22
· 2 commits to main since this release
c4bbac2

⚠️ Breaking

  • ddredis.decorators is removed. GenericCache suppresses RedisError through safe_call(default_result=None, exceptions=(RedisError,), capture_exception=False) from ddutils 0.4, which handles coroutine functions, and keeps the decorator private. Code that imported suppress_redis_errors uses ddutils.safe_decorators.safe_call with 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 production create_func did 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 GenericCache docstring no longer claims msgspec compatibility: a Struct has neither model_validate_json nor model_dump_json. Its example wires the client registry with process_loop_scope from ddutils 0.4.0.

📝 Docs

  • GenericCache: the checks at class definition, the key format :<snake_case_domain>:<key>, get_list / delete_by_filters as SCAN MATCH over the whole keyspace, an entry that does not deserialize reads as a miss, the jitter is ttl // 10 and so zero under 10 seconds, the client may run with or without decode_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, key stored as given, AlreadyAcquiredError also when a blocking wait runs out, not reentrant but reusable after release(), extend() on an expired key raises redis-py's LockNotOwnedError and either without acquire() raises LockError.
  • RedisFeatureFlagStorage: the signature with alias and key, 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_map keeps the valid records.
  • The layout follows dd-lib-stub, with a Compatibility section.

Full Changelog: v0.2.0...v0.3.0