Copy of https://bitbucket.org/bkroeze/django-keyedcache with a few minor alterations