#3012: Traceback when using locmem cache backend
--------------------------+-------------------------------------------------
Reporter: Alex Dedul | Owner: jacob
Status: closed | Component: Cache system
Version: | Resolution: worksforme
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
--------------------------+-------------------------------------------------
Changes (by Oliver Beattie <[EMAIL PROTECTED]>):
* status: new => closed
* resolution: => worksforme
Comment:
Replying to [comment:4 Gary Wilson <[EMAIL PROTECTED]>]:
> {{{
> #!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.
Patch works for me - Thanks, Gary!
--
Ticket URL: <http://code.djangoproject.com/ticket/3012#comment:5>
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
-~----------~----~----~----~------~----~------~--~---