Skip to main content
Cache Memory

While using CDN caches like Cloudflare or Akamai and even for http caches like Varnish, it is important to "warm the cache" after deployments when the caches are usually cleared. This means sometimes manually loading up all the important pages for the first time so that it is loaded into cache. What if this could be automated through the sitemap using a simple CDN cache warmer.

Well, it can be done through this tiny program I wrote in Rust: https://github.com/codingsasi/warmer. All the important URLs of the site are in the sitemap.xml, which is a standard format which most sites follow. If your site does not have one, ping me I'll tell you what to do. So, my warmer loads every URL in the sitemap.xml once and this warms the cache. Simple.

After it completes running, it will display a summary of how many URLs were crawled and what the average response time was.
CDN cache warmer
I'm constantly improving on this and try to get a new release out every week with more features and improvements.

 

Tags

x

Work

Therefore logo
80 Atlantic Ave, Toronto, ON Canada
Email: hello@therefore.ca
Call us: +1 4166405376
Linkedin

Let us know how we can help!