1. Mike Bayer
  2. dogpile.cache


Łukasz Fidosz  committed fe8a9f1

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

  • Participants
  • Parent commits 3785f3b
  • Branches master

Comments (0)

Files changed (1)

File dogpile/cache/backends/redis.py

View file
             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: