0

In a Django website I use memcached to save a variable in cache. After some minutes, if I refresh the page, the variable is lost.

I am in develop mode using runserver.

Any ideas?

1 Answer 1

2

Cache keys are expired after some time. If you don't explicitly pass timeout to cache.set, Django will use defaul, which it retrieves from settings. If you didn't specify default timeout yourself, Django will use its own default.

Sign up to request clarification or add additional context in comments.

1 Comment

300 seconds by default means 5 minutes: it's compatible with my logout times.. thank you, I'll check it immediately!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.