selwin/django-user_agents — pull request #2 by therealtomrose (2013-04-23 18:28:53+00:00)
Title: Added unique identifier to cache_key in utils.py

Selwin,

Love django_user_agents. It just saved me a ton of time and effort. Great usability.

I was just debugging my cache and had a heck of a time figuring out what this one entry was that didn't have a unique identifier. It turned out to be django-user_agents. I was only able to figure this out by searching for the hash itself and found out that it was a user_agent string. That's what tipped me off. Any how...

The django best practice appears to be appending a unique string to the cache_key for identification purposes. I prepended 'django_user_agents.' to the md5 you were using.

Fast, and easy :)

Happy coding,

T