One of the most common questions we are asked at Section is “how long does it take to (select your favourite term) “clear”, “purge”, “evict”, or “ban” an item the cache?” Our answer has been “near real time” as we built Section to instantly purge cache globally.
We monitor every cache purge on our platform and I thought it might be interesting to review the results and put some hard numbers against the time to clear cache on Section.
How to Clear Cache on Section
As a bit of background, users of Section can clear their cache in a number of ways to achieve any cache clearing outcome they may desire, from very granular clearing to a broad dump of the Section cache globally:
1. Purge particular URLs
You can remove particular URLs from the cache by entering the URL and clicking Purge URL. This form accepts wildcards in the form of * so entering /assets/images followed by a star will purge all URLs starting with /assets/images.
2. Empty the entire cache
This will remove everything we have cached for your site. Use this if the cache is completely out of date and it needs to be refreshed. NOTE: This may cause increased load on your origin server until we are able to refill the cache.
3. Custom Varnish Cache ban expression
Our cache is an instance of Varnish Cache so you can use ban expressions to prevent objects from being served from the cache. To learn how to use bans, see the Varnish Cache documentation.
4. Clearing Pagespeed Cache
For users of Google’s Pagespeed module on Section, clearing the Pagespeed cache is simple as there is only one option: empty the entire cache. To do this, all you need to do is click the red button labeled Empty the entire cache.
5. Magento plugins
Users of Section’s Magento 2 plugin will have their Magento 2 website already hooked up to Section’s platform so, for example, if you update a product on your Magento 2 install it will clear the cache on Section of that product image automatically. Magento 2 users can also clear different parts of the Section cache within the extension. Magento 1 users can launch cache evicitions from the Magento 1 application by installing our Varnish version which supports the Turpentine extension.
Time to Clear Cache on Section
Section’s platform is a globally distributed Docker container platform. A cache evicition instruction can be launched from our console as described above, directly against our API gateway or from a Magento instance. Regardless of the trigger point, a cache clear instruction will hit our API gateway and then be distributed out to your Docker containers running whatever version of Varnish Cache or Pagespeed (or both) that you have running on Section.
How long does this take?
End to end, a cache purge on Section takes 180 milliseconds.
I just grabbed the following data describing the median and 95th percentile cache clear times from the Section platform globally over the last hour:
I have heard other content delivery solutions talk about cache clearing in minutes or seconds. It’s not fast enough unless we are talking milliseconds. And the time to apply a ban on the Section platform?
45 milliseconds (median obsevation from following graph):
How did we measure?
So we log the ban time for every ban (see following representation of the log in Kibana) and roll them up from there. This particular example was a Magento 2 initiated ban:
Try out containerized Content Delivery
To try Section’s content delivery solution and developer workflow please get in touch and we’d be happy to give you a demo and a free 14 day trial of our system and reverse proxies such as Varnish Cache, Pagespeed FEO, and Threat X.