You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Make BaseCache generic over both key and value types for improved type safety.
- Update all cache backends and usages to use BaseCache[KeyType, ValueType].
- Improve type annotations for cache methods.
- Update RedLock, OptimisticLock, and test utilities for new generics.
BREAKING CHANGE: BaseCache and all backends now require two type parameters (key, value). Existing code using a single type parameter must be updated.
Refs: aio-libs#608
We should consider making
BaseCache
Generic, so we can provide better type safety when relevant.Code could then look something like this, with mypy checking:
Existing typing behaviour can be reproduced by annotating it with
Cache[Any]
.The text was updated successfully, but these errors were encountered: