Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
  • Loading branch information...
commit 644e98136ad0e1d3c79b465a045440c2f77be660 1 parent 3e6f467
Jacob Kaplan-Moss authored April 01, 2009

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
@@ -58,8 +58,11 @@ def get(self, key, default=None):
58 58
             self._lock.reader_leaves()
59 59
         self._lock.writer_enters()
60 60
         try:
61  
-            del self._cache[key]
62  
-            del self._expire_info[key]
  61
+            try:
  62
+                del self._cache[key]
  63
+                del self._expire_info[key]
  64
+            except KeyError:
  65
+                pass
63 66
             return default
64 67
         finally:
65 68
             self._lock.writer_leaves()

0 notes on commit 644e981

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