Hi
I am using memcached for caching objects , but am stuck with the
following
When I use the .all() method it works fine
>> from django.core.cache import cache
>>> user_list=User.objects.all()[0:10]
>>> key='userlist'
>>> cache.set(key,user_list)
But when I use .filter() method I get the following error
>>> user_list=User.objects.filter(is_staff=False)[0:10]
>>> key='userlist'
>>> cache.set(key,user_list)
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/home/bvemu/lib/python2.6/site-packages/django/core/cache/
backends/memcached.py", line 37, in set
self._cache.set(smart_str(key), value, timeout or
self.default_timeout)
File "/home/bvemu/lib/python2.6/site-packages/python_memcached-1.45-
py2.6.egg/memcache.py", line 515, in set
return self._set("set", key, val, time, min_compress_len)
File "/home/bvemu/lib/python2.6/site-packages/python_memcached-1.45-
py2.6.egg/memcache.py", line 725, in _set
store_info = self._val_to_store_info(val, min_compress_len)
File "/home/bvemu/lib/python2.6/site-packages/python_memcached-1.45-
py2.6.egg/memcache.py", line 697, in _val_to_store_info
pickler.dump(val)
PicklingError: Can't pickle <class
'django.utils.functional.__proxy__'>: attribute lookup
django.utils.functional.__proxy__ failed
please let me know if anyone has seen the error before
Thanks
Subramanyam
--
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.