mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-07 02:59:05 +00:00
[Fix] Add namespace check to async_delete_cache in Redis cache
Ensure key namespace is properly handled before deletion in async flow to maintain consistency with sync delete_cache method. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
d1df4e838b
commit
f1246c40c0
1 changed files with 1 additions and 0 deletions
|
|
@ -1260,6 +1260,7 @@ class RedisCache(BaseCache):
|
|||
# typed as Any, redis python lib has incomplete type stubs for RedisCluster and does not include `delete`
|
||||
_redis_client: Any = self.init_async_client()
|
||||
# keys is str
|
||||
key = self.check_and_fix_namespace(key=key)
|
||||
return await _redis_client.delete(key)
|
||||
|
||||
def delete_cache(self, key):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue