⬅︎ Back to Nasty surprise of Django cache
Unlike memcache, is locmem reset when you start django with ./manage.py?
Why not use locmem backend for tests?
Yes its reset, actually its reset whenever the code reloads as well. I usually do something like this in settings.py if DEBUG : CACHE_BACKEND = 'locmem:///' else : CACHE_BACKEND = 'memcached://127.0.0.1:11211'
That's actually a pretty good idea because I want the cache to be reset every time the dev server is restarted. Thanks.
Comment
Unlike memcache, is locmem reset when you start django with ./manage.py?
Parent comment
Why not use locmem backend for tests?
Replies
Yes its reset, actually its reset whenever the code reloads as well.
I usually do something like this in settings.py
if DEBUG :
CACHE_BACKEND = 'locmem:///'
else :
CACHE_BACKEND = 'memcached://127.0.0.1:11211'
That's actually a pretty good idea because I want the cache to be reset every time the dev server is restarted. Thanks.