mirror of
https://github.com/django/django.git
synced 2025-03-28 18:20:49 +00:00
Fixed #9644: fix a thread sync issue in the locmem cache. Thanks, mrts.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3e6f4674e2
commit
644e98136a
7
django/core/cache/backends/locmem.py
vendored
7
django/core/cache/backends/locmem.py
vendored
@ -58,8 +58,11 @@ class CacheClass(BaseCache):
|
||||
self._lock.reader_leaves()
|
||||
self._lock.writer_enters()
|
||||
try:
|
||||
del self._cache[key]
|
||||
del self._expire_info[key]
|
||||
try:
|
||||
del self._cache[key]
|
||||
del self._expire_info[key]
|
||||
except KeyError:
|
||||
pass
|
||||
return default
|
||||
finally:
|
||||
self._lock.writer_leaves()
|
||||
|
Loading…
x
Reference in New Issue
Block a user