Updated Mustache templates not being sent from Apache

Working with Mustache templates hosted on a Vagrant VM seems to inevitably cause issue with our development. When I change a template file the updated version never gets sent to the web browser. This can be very infuriating.

Apache httpd and VirtualBox don't seem to play nice with one another. Apache caches the Mustache template files and doesn't ever send the updated one. The only method that I've found is to rename the file to make it think it's a different file, which is not a great solution because you have to do it for every change.

After a lot of trials and tribulations of finding out what was happening and how to resolve this I thought it would be good to document it for others. Learn from my pain.

Just add this one line to the Apache conf file:

EnableSendfile Off  

Information on EnableSendFile

I know a few people have reported this behavior with boot2docker as well, so this may solve that. Please let me know if clears it up for you.

Ray Pierce

Web Developer, RetailMeNot, Mentor, NodeBot builder, Texan

Austin, TX Ya'll http://digitalpierce.com
comments powered by Disqus