Added memcache and moved 404 and 500 handlers to inside the views.py file