Used list comprehensions in RedisCache.delete_many().
@@ -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):
