Django's caching middleware not working in Gunicorn with Debug=False
问题 I have a Django project deployed with Gunicorn and nginx. I also have a memcached running and the Django cache middleware () set up to cache the site. Everything works fine when running with DEBUG=True, but when I switch to DEBUG=False I get the following error in Gunicorn log when trying to access the site: 2013-02-20 16:09:50 [25196] [ERROR] Error handling request Traceback (most recent call last): File "/home/toursprung/.virtualenvs/myproject/lib/python2.6/site-packages/gunicorn/workers