Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 392f81cba91310a93409c7b83a507c69736a19d2 1 parent 6e415a5
Malcolm Tredinnick authored

Showing 1 changed file with 5 additions and 2 deletions. Show diff stats Hide diff stats

  1. 7  django/core/cache/backends/locmem.py
7  django/core/cache/backends/locmem.py
@@ -96,8 +96,11 @@ def has_key(self, key):
96 96
 
97 97
         self._lock.writer_enters()
98 98
         try:
99  
-            del self._cache[key]
100  
-            del self._expire_info[key]
  99
+            try:
  100
+                del self._cache[key]
  101
+                del self._expire_info[key]
  102
+            except KeyError:
  103
+                pass
101 104
             return False
102 105
         finally:
103 106
             self._lock.writer_leaves()

0 notes on commit 392f81c

Please sign in to comment.
Something went wrong with that request. Please try again.