Serving the latest files (for cache invalidation)
If you are not familiar with caching, the basic idea is that some operations can take a long time to perform. We can speed up a system by storing the results of the operation in a place that is faster to access so that the next time we need them, they can be retrieved quickly. The “operation” that takes a long time can be anything – a function that takes a long time to run, an image that takes a long time to render, or a large asset that takes a long time to download over the internet. We are interested in this last scenario.
You might have noticed that the first time you ever visit a particular website, it can be slow to load, but then the next time, it loads much faster. This is because your browser has cached some (or all) of the static files the site needs to load.
To use our business site as an example, we have a page that includes the logo.png
file. The first time we visit the business site, we must...