  import re
  import time
  
  from django.conf import settings
  from django.core.cache import cache
  from django.utils.encoding import smart_str, iri_to_uri
  from django.utils.http import http_date
  from django.utils.hashcompat import md5_constructor
  from django.utils.translation import get_language
  from django.http import HttpRequest
 
</s> remove from django.middleware.cache import FetchFromCacheMiddleware, UpdateCacheMiddleware
 </s> add from django.middleware.cache import FetchFromCacheMiddleware, UpdateCacheMiddleware, CacheMiddleware
from django.test import RequestFactory </s> remove         cache_key = get_cache_key(request, self.key_prefix, 'GET')

 </s> add         cache_key = get_cache_key(request, self.key_prefix, 'GET', cache=self.cache) </s> remove def get_cache_key(request, key_prefix=None, method='GET'):
 </s> add def get_cache_key(request, key_prefix=None, method='GET', cache=None): </s> remove def learn_cache_key(request, response, cache_timeout=None, key_prefix=None):
 </s> add def learn_cache_key(request, response, cache_timeout=None, key_prefix=None, cache=None):
from django.core.cache import get_cache
  import re
  import time
  
  from django.conf import settings
from django.core.cache import get_cache
  from django.utils.encoding import smart_str, iri_to_uri
  from django.utils.http import http_date
  from django.utils.hashcompat import md5_constructor
  from django.utils.translation import get_language
  from django.http import HttpRequest
keep keep keep keep replace keep keep keep keep keep
 Beefed up the tests for multi-cache handling of the cache middleware and view decorators, and made a couple of tweaks for edge cases as a result.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15021 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/utils/cache.py