diff --git a/django/core/cache/backends/base.py b/django/core/cache/backends/base.py index 8adcdb9d49..a11ac71c95 100644 --- a/django/core/cache/backends/base.py +++ b/django/core/cache/backends/base.py @@ -394,6 +394,7 @@ class BaseCache: "configured correctly." ) + memcached_error_chars_re = _lazy_re_compile(r"[\x00-\x20\x7f]") diff --git a/django/core/cache/backends/filebased.py b/django/core/cache/backends/filebased.py index 8b9e18daab..41ee2689c0 100644 --- a/django/core/cache/backends/filebased.py +++ b/django/core/cache/backends/filebased.py @@ -14,6 +14,7 @@ from django.core.checks import Warning from django.core.files import locks from django.core.files.move import file_move_safe + class FileBasedCache(BaseCache): cache_suffix = ".djcache" pickle_protocol = pickle.HIGHEST_PROTOCOL diff --git a/django/core/checks/caches.py b/django/core/checks/caches.py index 4986a800d2..857f8bf401 100644 --- a/django/core/checks/caches.py +++ b/django/core/checks/caches.py @@ -1,5 +1,4 @@ import pathlib -import json from django.conf import settings from django.core.cache import DEFAULT_CACHE_ALIAS, caches