Author: mtredinnick
Date: 2009-03-08 05:02:23 -0500 (Sun, 08 Mar 2009)
New Revision: 10001

Modified:
   django/branches/releases/1.0.X/django/core/cache/backends/locmem.py
Log:
[1.0.X] Fixed #9626 -- Fixed a deletion race in the locmem cache.

Backport of r9998 from trunk.

Modified: django/branches/releases/1.0.X/django/core/cache/backends/locmem.py
===================================================================
--- django/branches/releases/1.0.X/django/core/cache/backends/locmem.py 
2009-03-08 10:01:59 UTC (rev 10000)
+++ django/branches/releases/1.0.X/django/core/cache/backends/locmem.py 
2009-03-08 10:02:23 UTC (rev 10001)
@@ -96,8 +96,11 @@
 
         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()


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to