  warnings.simplefilter("error", RuntimeWarning)
  # Ignore known warnings in test dependencies.
  warnings.filterwarnings("ignore", "'U' mode is deprecated", DeprecationWarning, module='docutils.io')
  
  RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))
  
  TEMPLATE_DIR = os.path.join(RUNTESTS_DIR, 'templates')
  
  # Create a specific subdirectory for the duration of the test suite.
 
</s> remove             # Some clients (e.g. pylibmc) raise when the value is too large,
            # while others (e.g. python-memcached) intentionally return True
            # indicating success. This test is primarily checking that the key
            # was deleted, so the return/exception behavior for the set()
            # itself is not important.
 </s> add             # Most clients (e.g. pymemcache or pylibmc) raise when the value is
            # too large. This test is primarily checking that the key was
            # deleted, so the return/exception behavior for the set() itself is
            # not important. </s> remove     # Some caches -- python-memcached in particular -- need to do a cleanup at the
    # end of a request cycle. If not implemented in a particular backend
    # cache.close is a no-op
 </s> add     # Some caches need to do a cleanup at the end of a request cycle. If not
    # implemented in a particular backend cache.close() is a no-op. </s> remove         # pylibmc doesn't seem to have SERVER_MAX_VALUE_LENGTH as far as I can
        # tell from a quick check of its source code. This is falling back to
        # the default value exposed by python-memcached on my system.
        max_value_length = getattr(cache._lib, 'SERVER_MAX_VALUE_LENGTH', 1048576)
 </s> add         max_value_length = 2 ** 20 </s> remove MemcachedCache_params = configured_caches.get('django.core.cache.backends.memcached.MemcachedCache')
 </s> add  </s> remove Here's an example configuration for a ``python-memcached`` based backend with
an object size limit of 2MB::

    CACHES = {
        'default': {
            'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
            'LOCATION': '127.0.0.1:11211',
            'OPTIONS': {
                'server_max_value_length': 1024 * 1024 * 2,
            }
        }
    }

 </s> add 
# RemovedInDjango41Warning: Ignore MemcachedCache deprecation warning.
warnings.filterwarnings(
    'ignore',
    'MemcachedCache is deprecated',
    category=RemovedInDjango41Warning,
)
  warnings.simplefilter("error", RuntimeWarning)
  # Ignore known warnings in test dependencies.
  warnings.filterwarnings("ignore", "'U' mode is deprecated", DeprecationWarning, module='docutils.io')
# RemovedInDjango41Warning: Ignore MemcachedCache deprecation warning.
warnings.filterwarnings(
    'ignore',
    'MemcachedCache is deprecated',
    category=RemovedInDjango41Warning,
)
  
  RUNTESTS_DIR = os.path.abspath(os.path.dirname(__file__))
  
  TEMPLATE_DIR = os.path.join(RUNTESTS_DIR, 'templates')
  
  # Create a specific subdirectory for the duration of the test suite.
keep keep add keep keep keep keep keep keep
 Fixed #32193 -- Deprecated MemcachedCache. 
tests/runtests.py