Commits

Łukasz Fidosz committed fe8a9f1

changed pickle protocol to pickle.HIGHEST_PROTOCOL in set_multi method of redis backend

  • Participants
  • Parent commits 3785f3b

Comments (0)

Files changed (1)

dogpile/cache/backends/redis.py

             self.client.set(key, pickle.dumps(value, pickle.HIGHEST_PROTOCOL))
 
     def set_multi(self, mapping):
-        mapping = dict((k, pickle.dumps(v)) for k, v in mapping.items())
+        mapping = dict(
+            (k, pickle.dumps(v, pickle.HIGHEST_PROTOCOL))
+            for k, v in mapping.items()
+        )
 
         if not self.redis_expiration_time:
             self.client.mset(mapping)