Author: Alex
Date: 2011-09-10 10:09:23 -0700 (Sat, 10 Sep 2011)
New Revision: 16778
Modified:
django/trunk/django/core/cache/backends/dummy.py
django/trunk/tests/regressiontests/cache/tests.py
Log:
Fixed #16162. Added timeout arg to `DummyCache.set_many`, for compatiblity with
other caches. Thanks to aaugustin for the patch.
Modified: django/trunk/django/core/cache/backends/dummy.py
===================================================================
--- django/trunk/django/core/cache/backends/dummy.py 2011-09-10 03:33:54 UTC
(rev 16777)
+++ django/trunk/django/core/cache/backends/dummy.py 2011-09-10 17:09:23 UTC
(rev 16778)
@@ -32,7 +32,7 @@
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):
Modified: django/trunk/tests/regressiontests/cache/tests.py
===================================================================
--- django/trunk/tests/regressiontests/cache/tests.py 2011-09-10 03:33:54 UTC
(rev 16777)
+++ django/trunk/tests/regressiontests/cache/tests.py 2011-09-10 17:09:23 UTC
(rev 16778)
@@ -147,6 +147,7 @@
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"
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en.