How do I check if memcache is working?
I recently set up memcache. How do I check that it is working correctly?
Log in to django's shell:
python manage.py shell
and type:
from django.core.cache import cache
cache.set('somekey', 'someval')
cache.get('somekey')
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.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2012-07-24 23:24:09 -0500
Seen: 2,737 times
Last updated: Jul 26 '12
How do I configure memcached for Django 1.3?
What may be wrong with using the local memory caching?
Incorrect timestamps in the content displays
AskBot v0.10.2: How to update footer.html ...
How to make askbot work with memcached?
LANGUAGE_CODE = 'ja' causes many test failures and errors
Why doesn't settings = cache.get('askbot-livesettings') return anything?
Haystack test 'test_user_profile_search' fails
Test 'test_title_search_groups_enabled' fails with Haystack search on