          self.cache = get_cache('locmem://?max_entries=30&cull_frequency=0')
          self.perform_cull_test(50, 19)
  
  # memcached backend isn't guaranteed to be available.
  # To check the memcached backend, the test settings file will
  # need to contain a cache backend setting that points at
  # your memcache server.
 
</s> remove         self.cache_timeout = cache_timeout
        if cache_timeout is None:
            self.cache_timeout = settings.CACHE_MIDDLEWARE_SECONDS

 </s> add  </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): </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 test_multiple_caches(self):
        "Check that multiple locmem caches are isolated"
        mirror_cache = get_cache('django.core.cache.backends.locmem.LocMemCache')
        other_cache = get_cache('django.core.cache.backends.locmem.LocMemCache', LOCATION='other')

        self.cache.set('value1', 42)
        self.assertEquals(mirror_cache.get('value1'), 42)
        self.assertEquals(other_cache.get('value1'), None)

          self.cache = get_cache('locmem://?max_entries=30&cull_frequency=0')
          self.perform_cull_test(50, 19)
  
    def test_multiple_caches(self):
        "Check that multiple locmem caches are isolated"
        mirror_cache = get_cache('django.core.cache.backends.locmem.LocMemCache')
        other_cache = get_cache('django.core.cache.backends.locmem.LocMemCache', LOCATION='other')

        self.cache.set('value1', 42)
        self.assertEquals(mirror_cache.get('value1'), 42)
        self.assertEquals(other_cache.get('value1'), None)

  # memcached backend isn't guaranteed to be available.
  # To check the memcached backend, the test settings file will
  # need to contain a cache backend setting that points at
  # your memcache server.
keep keep add 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 
tests/regressiontests/cache/tests.py