Problems with low level caching and locmem backend

5 views
Skip to first unread message

Lawrence Oluyede

unread,
Feb 9, 2007, 9:38:53 AM2/9/07
to django...@googlegroups.com, django-d...@googlegroups.com
I'm trying to put in the cache a simple Python list made of unicode
strings. The strange thing is locmem crashes badly during the first
retrieval of a cache hit. The same code with the simple backend is
like a breeze.

I looked into locmem.py and simple.py backends and as the traceback
states the problem seems to be locmem's get() which uses
copy.deepcopy() to avoid aliasing (see
http://code.djangoproject.com/ticket/599).

The whole thing seems a little wierd to me because I know deepcopy()
can handle a simple list made of unicode strings. I also tried to
print verbatim the content of the cache before the crash and there's
nothing strange in there.

The full traceback is here: http://dpaste.com/hold/5482/

I also found this ticket: http://code.djangoproject.com/ticket/3012
Basically the person wants to revert #599

I'm not sure if it's right to post this also to the developer list
because I'm not sure it's a Django problem.

I'm using Python 2.5 and Django SVN in development mode, by the way.

--
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair

Reply all
Reply to author
Forward
0 new messages