diff options
| author | Olivier Tabone <olivier.tabone@ripplemotion.fr> | 2016-11-06 12:57:38 +0100 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2017-09-06 14:38:44 -0400 |
| commit | a027447f5606d60358e5da76c0e8233732ad2b17 (patch) | |
| tree | 6e06934fc26d48fc59ccb5f45c3800368e625aad /django/core/cache/backends/base.py | |
| parent | 407c1249c9a0296ec8a8d95e447bd695ca471b5e (diff) | |
Fixed #27318 -- Made cache.set_many() return the list of failed keys.
Diffstat (limited to 'django/core/cache/backends/base.py')
| -rw-r--r-- | django/core/cache/backends/base.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py index a0ed8275f9..aaf34c042e 100644 --- a/django/core/cache/backends/base.py +++ b/django/core/cache/backends/base.py @@ -206,9 +206,13 @@ class BaseCache: If timeout is given, use that timeout for the key; otherwise use the default cache timeout. + + On backends that support it, return a list of keys that failed + insertion, or an empty list if all keys were inserted successfully. """ for key, value in data.items(): self.set(key, value, timeout=timeout, version=version) + return [] def delete_many(self, keys, version=None): """ |
