New Django middleware not getting called
It was a silly glitch. I found out that i needed to reload gunicorn server to make the new middleware work. Thanks everybody for the help.
I am quite new to web development. I am working on a website hosted on amazon ec2 server. The site is in python using django framework. I am using memcached to cache some client information. My site and caching works on local machine but not on the EC2 server. I checked memcached server and found out that it was not able to set the keys. Is there something I might need to change in settings.py so that keys are set appropriately on the server or something else that I might be missing. 
EDIT: Found out the problem. I added a new middleware for setting keys in the memcache. That is not getting called. It works perfectly on the local machine. On the server I am using gunicorn as the app server and nginx as the reverse proxy. Can any of these cause the problems. Also I tried to reload nginx but that didn't help either.