Loading django/core/cache/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ class CacheHandler(object): caches = CacheHandler() class DefaultCacheProxy(object): """ Proxy access to the default Cache object's attributes. Loading django/templatetags/cache.py +1 −1 Original line number Diff line number Diff line from __future__ import unicode_literals from django.core.cache import cache, caches, InvalidCacheBackendError from django.core.cache import caches, InvalidCacheBackendError from django.core.cache.utils import make_template_fragment_key from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist Loading tests/cache/tests.py +4 −5 Original line number Diff line number Diff line Loading @@ -6,10 +6,8 @@ from __future__ import unicode_literals import os import pickle import random import re import shutil import string import tempfile import threading import time Loading Loading @@ -1039,8 +1037,8 @@ class MemcachedCacheTests(BaseCacheTests, TestCase): # Explicitly display a skipped test if no configured cache uses MemcachedCache @unittest.skipUnless( any(cache['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache' for cache in settings.CACHES.values()), any(c['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache' for c in settings.CACHES.values()), "cache with python-memcached library not available") def test_memcached_uses_highest_pickle_version(self): # Regression test for #19810 Loading Loading @@ -1159,7 +1157,6 @@ class CacheUtils(TestCase): self.path = '/cache/test/' self.factory = RequestFactory() def test_patch_vary_headers(self): headers = ( # Initial vary, new headers, resulting vary. Loading Loading @@ -1903,6 +1900,7 @@ class TestMakeTemplateFragmentKey(TestCase): self.assertEqual(key, 'template.cache.spam.f27688177baec990cdf3fbd9d9c3f469') class CacheHandlerTest(TestCase): def test_same_instance(self): """ Loading @@ -1919,6 +1917,7 @@ class CacheHandlerTest(TestCase): instances. """ c = [] def runner(): c.append(caches['default']) Loading Loading
django/core/cache/__init__.py +1 −0 Original line number Diff line number Diff line Loading @@ -114,6 +114,7 @@ class CacheHandler(object): caches = CacheHandler() class DefaultCacheProxy(object): """ Proxy access to the default Cache object's attributes. Loading
django/templatetags/cache.py +1 −1 Original line number Diff line number Diff line from __future__ import unicode_literals from django.core.cache import cache, caches, InvalidCacheBackendError from django.core.cache import caches, InvalidCacheBackendError from django.core.cache.utils import make_template_fragment_key from django.template import Library, Node, TemplateSyntaxError, VariableDoesNotExist Loading
tests/cache/tests.py +4 −5 Original line number Diff line number Diff line Loading @@ -6,10 +6,8 @@ from __future__ import unicode_literals import os import pickle import random import re import shutil import string import tempfile import threading import time Loading Loading @@ -1039,8 +1037,8 @@ class MemcachedCacheTests(BaseCacheTests, TestCase): # Explicitly display a skipped test if no configured cache uses MemcachedCache @unittest.skipUnless( any(cache['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache' for cache in settings.CACHES.values()), any(c['BACKEND'] == 'django.core.cache.backends.memcached.MemcachedCache' for c in settings.CACHES.values()), "cache with python-memcached library not available") def test_memcached_uses_highest_pickle_version(self): # Regression test for #19810 Loading Loading @@ -1159,7 +1157,6 @@ class CacheUtils(TestCase): self.path = '/cache/test/' self.factory = RequestFactory() def test_patch_vary_headers(self): headers = ( # Initial vary, new headers, resulting vary. Loading Loading @@ -1903,6 +1900,7 @@ class TestMakeTemplateFragmentKey(TestCase): self.assertEqual(key, 'template.cache.spam.f27688177baec990cdf3fbd9d9c3f469') class CacheHandlerTest(TestCase): def test_same_instance(self): """ Loading @@ -1919,6 +1917,7 @@ class CacheHandlerTest(TestCase): instances. """ c = [] def runner(): c.append(caches['default']) Loading