Used list comprehensions in RedisCache.delete_many().

This commit is contained in:
Christos Kopanos 2022-07-06 10:35:09 +02:00 committed by Mariusz Felisiak
parent 3926e35aa8
commit fcee0d3fb6
1 changed files with 1 additions and 4 deletions

View File

@ -222,10 +222,7 @@ class RedisCache(BaseCache):
return []
def delete_many(self, keys, version=None):
safe_keys = []
for key in keys:
key = self.make_and_validate_key(key, version=version)
safe_keys.append(key)
safe_keys = [self.make_and_validate_key(key, version=version) for key in keys]
self._cache.delete_many(safe_keys)
def clear(self):