summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Gaynor <alex.gaynor@gmail.com>2011-09-10 17:09:23 +0000
committerAlex Gaynor <alex.gaynor@gmail.com>2011-09-10 17:09:23 +0000
commit67dde2f52f69e9a3834c196135462c93b41649d0 (patch)
tree5aac4d5d0992a1cd14b5d47352b1186657be6743
parentb557810207a2fb20e90872bad831634bc4734482 (diff)
Fixed #16162. Added timeout arg to `DummyCache.set_many`, for compatiblity with other caches. Thanks to aaugustin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--django/core/cache/backends/dummy.py2
-rw-r--r--tests/regressiontests/cache/tests.py1
2 files changed, 2 insertions, 1 deletions
diff --git a/django/core/cache/backends/dummy.py b/django/core/cache/backends/dummy.py
index af8b62c8dd..9fe9b3b5f5 100644
--- a/django/core/cache/backends/dummy.py
+++ b/django/core/cache/backends/dummy.py
@@ -32,7 +32,7 @@ class DummyCache(BaseCache):
self.validate_key(key)
return False
- def set_many(self, data, version=None):
+ def set_many(self, data, timeout=0, version=None):
pass
def delete_many(self, keys, version=None):
diff --git a/tests/regressiontests/cache/tests.py b/tests/regressiontests/cache/tests.py
index 2a326ade5d..d3070305cb 100644
--- a/tests/regressiontests/cache/tests.py
+++ b/tests/regressiontests/cache/tests.py
@@ -147,6 +147,7 @@ class DummyCacheTests(unittest.TestCase):
def test_set_many(self):
"set_many does nothing for the dummy cache backend"
self.cache.set_many({'a': 1, 'b': 2})
+ self.cache.set_many({'a': 1, 'b': 2}, timeout=2, version='1')
def test_delete_many(self):
"delete_many does nothing for the dummy cache backend"