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:
Jacob Kaplan-Moss 2009-04-01 17:05:19 +00:00
parent 3e6f4674e2
commit 644e98136a
1 changed files with 5 additions and 2 deletions

View File

@ -57,9 +57,12 @@ class CacheClass(BaseCache):
finally:
self._lock.reader_leaves()
self._lock.writer_enters()
try:
try:
del self._cache[key]
del self._expire_info[key]
except KeyError:
pass
return default
finally:
self._lock.writer_leaves()