Beware of GitHub File Caching

As we released our latest version of Mongosis today we found a slight quirk with GitHub downloads where it appears to be caching files by name and size. For performance it’s not necessarily a bad thing but it’s important to be aware of; particularly in the following case:

In order to create a consistent URL to download the latest version of Mongosis (without having to update all the references to it), we would create a copy of the latest version in the GitHub downloads directory named mongosis-latest.msi and link directly to that. After replacing the mongosis-latest with our new latest version, when it came to testing the download, we found that it was bizarrely installing the previous version. After initially thinking we must have botched-up and uploaded the wrong version, a second trial yielded the same result.

A few more tests using completely different files and filenames deduced that despite being a totally different file, it was being deemed by GitHub as identical to the previous version because it had the same name and size. This was causing the download link to just fetch the cached previous version.

We have since scrapped the mongosis-latest as a file approach, and used a redirect mechanism.

Ready to start your career at Simply Business?

Want to know more about what it’s like to work in tech at Simply Business? Read about our approach to tech, then check out our current vacancies.

Simply Business Editorial Team

This block is configured using JavaScript. A preview is not available in the editor.