Blog

Introducing the Ability to Purge by Cache Tag

March 25, 2019 · by Sid Phadkar ·

We’re proud to announce that the new purge by cache tag functionality in Akamai’s Fast Purge is now available to all Akamai content delivery product customers.

To get here, we went through an exciting, year-long beta with more than 200 participants purging ~200,000,000 tags; during this time, we noted some fascinating (and surprising!) ways that customers leveraged tags in their caching strategy. In this post, we share our six favorite scenarios that we observed.

But first, a bit of background on cache tags, and why we think you’ll love this new functionality.

Cache tags are a convenient way to update cached content on edge servers. If you have a collection of objects that tend to be refreshed at the same time, you can now associate them collectively with a single cache tag which allows you to purge all content possessing this tag with a single request. The purpose of tagging is for you to be able to purge cached content by calling it with a natural-language identifier rather than a technical identifier (e.g., URL or CP code). This gives you a new level of control while making the purge process simpler, faster, and more efficient.

And now, without further ado...

The Top Six Purge by Cache Tag Scenarios

1) Purging content in real time during live events

A high-traffic sports website talked to us about how they are leveraging tags to keep their website updated during live sporting events in real time. The website tracks live scores, player and team dashboards, tons of stats around tournament standings, play-by-play updates, and more across multiple simultaneous sporting events; this requires multiple assets on the website to be updated in real time. In the past, this volume of real-time updates would require the website’s dev team to batch-process 500+ URLs. With cache tags, a single tag can be associated with all of these assets and the website can be seamlessly updated on the fly.

2) Purging content across many clients

A global digital leader has a public-facing service that provides context-based, highly personalized tutorials for their products. The tutorials—which are in the form of a JSON Blob—are consumed by many different mobile and desktop clients. By leveraging a client ID served on request, the clients know how to render these tutorials. Anytime a tutorial is updated (which happens often), the out-of-date content must be invalidated and refreshed. The company’s dev team leverages cache tags to group the content across different clients; this allows them to update the content in real time with a single request, making their content-refresh strategy much more efficient and dynamic.

3) Purging product content in online retail

Cache tags play a critical role when it comes to retail websites. Often a single product (identified by a product ID) is spread across multiple domains, catalogs, product lines, and even third-party sites. Keeping track of all these various locations can be extremely challenging: retail participants in our beta program often had tens of thousands of products spread across hundreds of locations. This can be a nightmare when it comes to content updates, particularly those around critical events such as flash sales, new offers, inventory updates, and pricing updates. Our participants leveraged cache tags to tag assets with product IDs; every time a particular product needed to be updated, the dev team simply purged the product ID tag associated with it.

4) Purging related images

Cache tags are an extremely powerful tool when it comes to image management. Serving web content today often involves dealing with many renditions of a single image; these variations can include everything from different thumbnail sizes (often tailored to devices or clients), multiple operating systems, the requirements of third-party sites, and more. Updating an image usually means all these variants need to be updated at the same time, making purging groups of related images via a cache tag extremely efficient with both infrastructure and dev resources.

5) Purging sub-customers for SaaS providers

A few of our beta participants were leading SaaS providers who regularly dealt with refreshing content for thousands of customers. NowFloats, a premier Indian SaaS provider that enables businesses to control their online presence, has about 250,000 customers today. The dev team at NowFloats leveraged the new purge by cache tag functionality to group content for each of these customers by assigning a unique tag and then purged that tag when that content needed to be updated live.

6) Purging content via a Drupal plugin

As author Josh Waihi put it in a recent Acquia blog post, “Cache tags are a game-changer for your caching strategy in Drupal 8.” A number of our beta participants wanted to bring Drupal 8 into their CMS strategy and they found that cache tags were the only way to make it happen. Our friends at cloud computing services leader Rackspace went a step further, building an Akamai provider plugin for Drupal 8 to enable a seamless content management experience for users. When editing content in Drupal, the provider that Rackspace built enables grouping of nodes which allows many dependent nodes to be refreshed at the same time. This again ensures that end users are as productive as possible around updating their content in real time.

Conclusion

Every day, dev teams around the world rely on Akamai’s Fast Purge to help them purge content in a matter of seconds. Now, purging content via cache tags opens up additional cache strategies that give you greater control and allow you to maximize offload, performance, and operational efficiency.

To learn more about how you can leverage tags within your Akamai caching setups, check out Akamai web performance architect Tim Vereecke’s fantastic blog post, "A Technical Deep Dive Into Purging by Cache Tag".

In addition, I encourage you to browse these other helpful resources:

Sid Phadkar is a product manager at Akamai Technologies.