Developing with Flask and Mustache
I'm using Flask to make a web app and using mustache templates (alongwith sammy.js). I'm running the app with debug=True but whenever I make changes in the mustache template (or other static assets) I need to clear the browser cookies and cache to make sure that the changes are visible. Other times, I need to use Chrome in incognito mode to see the changes. How can I avoid this hassle? Is there a way to see the changes by just reloading the page.
The simplest way would be to deactivate the cache in your browser. In Chrome is there a great checkbox under the settings of the web inspector.
A other way should be to remove the cache http header keys. There is a flask settings key SEND_FILE_MAX_AGE_DEFAULT with that you should control the cache lifetime of static files.
You can manage your static assets using the Flask-Assets extension. The library the extension uses allows for cache busting.