mirror of
https://github.com/django/django.git
synced 2024-12-24 01:55:49 +00:00
Fixed #9626 -- Fixed a deletion race in the locmem cache.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9998 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
6e415a5f90
commit
392f81cba9
7
django/core/cache/backends/locmem.py
vendored
7
django/core/cache/backends/locmem.py
vendored
@ -96,8 +96,11 @@ class CacheClass(BaseCache):
|
||||
|
||||
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 False
|
||||
finally:
|
||||
self._lock.writer_leaves()
|
||||
|
Loading…
Reference in New Issue
Block a user