      Also used as the hook point for the cache decorator, which is generated
      using the decorator-from-middleware utility.
      """
      def __init__(self, cache_timeout=None, cache_anonymous_only=None, **kwargs):
          self.cache_timeout = cache_timeout
          if cache_timeout is None:
              self.cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS
  
          # We need to differentiate between "provided, but using default value",
          # and "not provided". If the value is provided using a default, then
          # we fall back to system defaults. If it is not provided at all,
          # we need to use middleware defaults.
          try:
 
</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) </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         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)
      Also used as the hook point for the cache decorator, which is generated
      using the decorator-from-middleware utility.
      """
      def __init__(self, cache_timeout=None, cache_anonymous_only=None, **kwargs):




          # We need to differentiate between "provided, but using default value",
          # and "not provided". If the value is provided using a default, then
          # we fall back to system defaults. If it is not provided at all,
          # we need to use middleware defaults.
          try:
keep keep keep keep replace replace replace 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/middleware/cache.py