Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[1.0.X] Fixed #9626 -- Fixed a deletion race in the locmem cache.

Backport of r9998 from trunk.

git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit b1fd7650a9f44e3a31b50e1b1393d931ceba57fe 1 parent 055c011
Malcolm Tredinnick malcolmt authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 django/core/cache/backends/locmem.py
7 django/core/cache/backends/locmem.py
View
@@ -96,8 +96,11 @@ def has_key(self, key):
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()
Please sign in to comment.
Something went wrong with that request. Please try again.