Ask Your Question

How do I check if memcache is working?

asked 2012-07-24 23:24:09 -0600

Joseph's avatar

I recently set up memcache. How do I check that it is working correctly?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-07-26 21:16:34 -0600

Evgeny's avatar

Log in to django's shell:

python shell

and type:

from django.core.cache import cache
cache.set('somekey', 'someval')

You should get back 'someval' when the cache works. You can confirm that with the dummy cache backend the cache.get('somekey') will return None, but with some real backend you'll get the stored value.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2012-07-24 23:24:09 -0600

Seen: 2,839 times

Last updated: Jul 26 '12