      cache_key = 'views.decorators.cache.cache_header.%s.%s' % (
          key_prefix, path.hexdigest())
      return _i18n_cache_key_suffix(request, cache_key)
  
  def get_cache_key(request, key_prefix=None, method='GET'):
      """
      Returns a cache key based on the request path. It can be used in the
      request phase because it pulls the list of headers to take into account
      from the global path registry and uses those to build a cache key to check
      against.
 
</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): </s> remove         self.cache_timeout = cache_timeout
        if cache_timeout is None:
            self.cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS

 </s> add  </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             cache_key = get_cache_key(request, self.key_prefix, 'HEAD')
 </s> add             cache_key = get_cache_key(request, self.key_prefix, 'HEAD', cache=self.cache)
def get_cache_key(request, key_prefix=None, method='GET', cache=None):
      cache_key = 'views.decorators.cache.cache_header.%s.%s' % (
          key_prefix, path.hexdigest())
      return _i18n_cache_key_suffix(request, cache_key)
  
def get_cache_key(request, key_prefix=None, method='GET', cache=None):
      """
      Returns a cache key based on the request path. It can be used in the
      request phase because it pulls the list of headers to take into account
      from the global path registry and uses those to build a cache key to check
      against.
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