Я хочу, чтобы memcached сбрасывался при каждом перезапуске / перезагрузке сервера django. Я использую Cherrypy для производства и встроенный сервер для разработки.
Я бы добавил это в settings.py сразу после CACHES:
from django.core.cache import cache
cache.clear()
, но он выполняет рекурсивный импорт:
Error: Can't find the file 'settings.py' in the directory containing 'manage.py'. It appears you've customized things.
You'll have to run django-admin.py, passing it your settings module.
(If the file settings.py does indeed exist, it's causing an ImportError somehow.)
make: *** [server] Error 1
Есть другие предложения? Спасибо.