#3012: Traceback when using locmem cache backend
--------------------------+-------------------------------------------------
Reporter: Alex Dedul | Owner: jacob
Status: new | Component: Cache system
Version: | Resolution:
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------+-------------------------------------------------
Changes (by Gary Wilson <[EMAIL PROTECTED]>):
* has_patch: 0 => 1
Comment:
{{{
#!diff
--- django/core/cache/backends/locmem.py (revision 4391)
+++ django/core/cache/backends/locmem.py (working copy)
@@ -20,7 +20,7 @@
elif exp < now:
should_delete = True
else:
- return copy.deepcopy(self._cache[key])
+ return self._cache[key]
finally:
self._lock.reader_leaves()
if should_delete:
}}}
Is there a reason for the `copy.deepcopy`?
`django.core.cache.backends.simple.CacheClass` seems to not use it. The
patch above seems to work for me, but I have only tested it using the dev
server.
--
Ticket URL: <http://code.djangoproject.com/ticket/3012#comment:4>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---