[Answer]-Sessions on Memcached in Django , the cache expire time allways 300s when i set SESSION_COOKIE_AGE = 0

1👍

I find the reason!

There has CACHES in Settings.py.When you use memcached to store the session, and set SESSION_COOKIE_AGE=0. Django will use the default timeout(300s) for each cache.

If u want the set the cache never timeout, you need add TIMEOUT=0 into CACHES

👤Bina

0👍

EDIT : I found this post from 2006 https://groups.google.com/forum/#!topic/django-users/oLZTAAA6wVE
Try putting this setting in your app’s settings.py.

I think you could put an expiration time very far away (like 2050 for example) and it should work. Try maybe, who knows :p.

Leave a comment