Used list comprehensions in RedisCache.delete_many().
This commit is contained in:
parent
3926e35aa8
commit
fcee0d3fb6
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue