Wrapper for the django cache api to gracefully handle long or non-ascii keys