Commits

Mike Bayer committed 3a6a78e Merge

Merged in virhilo/dogpile.cache (pull request #6)

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

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)