diff options
| author | Jon Dufresne <jon.dufresne@gmail.com> | 2020-02-06 17:59:20 -0800 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2020-02-11 10:12:53 +0100 |
| commit | 7540b7eb318b552a4324adccf5d64d39fad2ee12 (patch) | |
| tree | db763bbe71a05640e98e830eec9b4a068c220755 /django | |
| parent | dc0dfd1dacfb26a3e7bcbe7aaf7658282cae3b54 (diff) | |
[3.0.x] Fixed #31253 -- Fixed data loss possibility when using caching from async code.
Case missed in a415ce70bef6d91036b00dd2c8544aed7aeeaaed.
Backport of e3f6e18513224c8ad081e5a19da641f49b0b43da from master
Diffstat (limited to 'django')
| -rw-r--r-- | django/core/cache/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/django/core/cache/__init__.py b/django/core/cache/__init__.py index a6b956fdf2..735b83e94f 100644 --- a/django/core/cache/__init__.py +++ b/django/core/cache/__init__.py @@ -12,7 +12,7 @@ object. See docs/topics/cache.txt for information on the public API. """ -from threading import local +from asgiref.local import Local from django.conf import settings from django.core import signals @@ -61,7 +61,7 @@ class CacheHandler: Ensure only one instance of each alias exists per thread. """ def __init__(self): - self._caches = local() + self._caches = Local() def __getitem__(self, alias): try: |
