The documentation mentions a RedisCache backend, but currently only MemoryCache is implemented in ryx/cache.py.
Goal: Implement the RedisCache class by inheriting from AbstractCache. It should use the redis-py (async) library to store and retrieve cached query results.
Implementation hint:
- Add
redis as an optional dependency.
- Implement
get, set, delete, delete_many, clear, and keys in ryx/cache.py.
- Ensure that values are serialized/deserialized (e.g., using
json or pickle) since Redis stores strings/bytes.
The documentation mentions a
RedisCachebackend, but currently onlyMemoryCacheis implemented inryx/cache.py.Goal: Implement the
RedisCacheclass by inheriting fromAbstractCache. It should use theredis-py(async) library to store and retrieve cached query results.Implementation hint:
redisas an optional dependency.get,set,delete,delete_many,clear, andkeysinryx/cache.py.jsonorpickle) since Redis stores strings/bytes.