Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

[1.0.X] Fixed #9644: fix a thread sync issue in the locmem cache. Tha…

…nks, mrts. Backport of r10333 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 34e823a699ff21c3780f2bcc52ca0cc7b50931a6 1 parent 6efe306
@jacobian jacobian authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/core/cache/backends/locmem.py
View
7 django/core/cache/backends/locmem.py
@@ -58,8 +58,11 @@ def get(self, key, default=None):
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()
Please sign in to comment.
Something went wrong with that request. Please try again.