From 512e17b41e54b4544fbffcbf03cd2e47393000e4 Mon Sep 17 00:00:00 2001
From: Florent Fourcot <florent.fourcot@wifirst.fr>
Date: Thu, 6 Oct 2016 15:07:45 +0200
Subject: [PATCH] Fixed #27318 -- Return list of failing keys with set_many()
Both python-memcached and pylibmc return the list of failing keys, but
we (previously) not give this list to the caller.
Signed-off-by: Florent Fourcot <florent.fourcot@wifirst.fr>
---
django/core/cache/backends/memcached.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/django/core/cache/backends/memcached.py b/django/core/cache/backends/memcached.py
index 4cf25fb..330afdc 100644
a
|
b
|
class BaseMemcachedCache(BaseCache):
|
147 | 147 | for key, value in data.items(): |
148 | 148 | key = self.make_key(key, version=version) |
149 | 149 | safe_data[key] = value |
150 | | self._cache.set_multi(safe_data, self.get_backend_timeout(timeout)) |
| 150 | # return the list of failing keys |
| 151 | return self._cache.set_multi(safe_data, self.get_backend_timeout(timeout)) |
151 | 152 | |
152 | 153 | def delete_many(self, keys, version=None): |
153 | 154 | self._cache.delete_multi(self.make_key(key, version=version) for key in keys) |