title: best place to clear cache when restarting django server
body: <p>I want memcached to be flushed on every restart/reload of django server. I use cherrypy for production and builtin server for development.</p>
  
  <p>I would add this to settings.py, right after CACHES:</p>
  
  <pre><code>from django.core.cache import cache
  cache.clear()
  </code></pre>
  
  <p>but it makes a recursive import:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Any other suggestions? Thanks.</p>