When I enable CacheMiddleware for site caching (using memcached as my
cache backend), I notice that if the page requires opening a file on
the file system or over http, that opening the file won't work, and
causes problems, the most typical being "ValueError: I/O operation on
closed file".
I also get this message when using the cache middleware and trying to
serve a file (after opening it on the filesystem, or over http) using
Django's HttpResponse (I know it's not recommended that I do that,
I've heard it several times, but it is absolutely necessary for the
project I am working on):
File "/usr/lib/python2.5/site-packages/cmemcache.py", line 87, in
_convert
val = pickle.dumps(val, 2)
PicklingError: Can't pickle <type 'instancemethod'>: attribute lookup
__builtin__.instancemethod failed
I would paste in some code examples, but this project is several
hundred lines long, and there are several incidences where I open
files that is conflicting with the cache middleware. I'm just
wondering if someone might have a better understanding of why this
happens. And if there is a way to fix or circumvent the problem. If I
need to provide more information about the problem I am having, please
let me know.
Thanks, Brandon
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=en
-~----------~----~----~----~------~----~------~--~---