I'm working on a website built with Django.  

When I'm doing updates on the static files, the users have to hard refresh the website to get the latest version.  

I'm using a CDN server to deliver my static files so using the built-in static storage from Django.  

I don't know about the best practices but my idea is to generate a random string when I redeploy the website and have something like `style.css?my_random_string`.  

I don't know how to handle such a global variable through the project (Using Gunicorn in production).  

I have a RedisDB running, I can store the random string in it and clear it on redeployment.  

I was thinking to have this variable globally available in templates with a `context_processors`. 

What are your thoughts on this ?