You probably worked this out already but the latest versions of python-
memcached don't work with python2.3.

I had to go back to version 1.34 before I found one that works.

On 24 Sep, 14:13, Nianbig <[EMAIL PROTECTED]> wrote:
> Hi
>
> I´m trying to get memcached up and running with Django.
> I have added the following to my settings.py:
> CACHE_BACKEND = 'memcached://127.0.0.1:11211/'
> CACHE_MIDDLEWARE_SECONDS = 10
> CACHE_MIDDLEWARE_KEY_PREFIX = 'testsite'
>
> And my middleware classes looks like this:
> MIDDLEWARE_CLASSES = (
>         'django.middleware.common.CommonMiddleware',
>         'django.contrib.sessions.middleware.SessionMiddleware',
>         'django.contrib.auth.middleware.AuthenticationMiddleware',
>         'django.middleware.doc.XViewMiddleware',
>         'django.middleware.cache.CacheMiddleware',
> )
>
> memcached is up and running with the following settings:
> #memcached -d -m 200 127.0.0.1 -p 11211 -v -uroot -c 8000
>
> I have tried to change the process owner to apache but it still doesn
> ´t work.
>
> The error message I get is:
>
> Mod_python error: "PythonHandler django.core.handlers.modpython"
>
> Traceback (most recent call last):
>
>   File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line
> 299, in HandlerDispatch
>     result = object(req)
>
>   File "/usr/lib/python2.3/site-packages/django/core/handlers/
> modpython.py", line 177, in handler
>     return ModPythonHandler()(req)
>
>   File "/usr/lib/python2.3/site-packages/django/core/handlers/
> modpython.py", line 154, in __call__
>     response = middleware_method(request, response)
>
>   File "/usr/lib/python2.3/site-packages/django/middleware/cache.py",
> line 82, in process_response
>     cache_key = learn_cache_key(request, response, self.cache_timeout,
> self.key_prefix)
>
>   File "/usr/lib/python2.3/site-packages/django/utils/cache.py", line
> 165, in learn_cache_key
>     cache.set(cache_key, [], cache_timeout)
>
>   File "/usr/lib/python2.3/site-packages/django/core/cache/backends/
> memcached.py", line 23, in set
>     self._cache.set(key, value, timeout or self.default_timeout)
>
>   File "build/bdist.linux-i686/egg/memcache.py", line 435, in set
>
>   File "build/bdist.linux-i686/egg/memcache.py", line 603, in _set
>
>   File "build/bdist.linux-i686/egg/memcache.py", line 576, in
> _val_to_store_info
>
> TypeError: Pickler()takesnokeywordarguments
>
> I´m using django 0.96.
>
> Thanks in advance.
> /Nianbig


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to