When website content—such as product details, news articles, or video lists—is updated, you often need to purge multiple cached objects distributed across various points of presence (POPs). Manually purgeing each object individually is inefficient and prone to omissions. The tag-based purge feature of Edge Security Acceleration (ESA) lets you assign cache tags to resources on the origin server. ESA POPs recognize these tags and associate them with cached resources. When content changes, you submit the specified tags to batch-purge all associated cached resources. This improves operational efficiency and ensures accurate content updates.
Features
The tag-based cache purge feature simplifies bulk purging of related cached resources. It reduces management overhead and increases efficiency. Key benefits include the following:
Efficient batch operations: For large groups of related resources—such as a news feature page with hundreds of images and multiple JS or CSS files—assign the same tag to all resources. Then purge the entire group with one action.
Improved O&M efficiency: Operations and development teams no longer need to track every resource URL. Instead, they focus on logical groupings—tags—to reduce complexity and avoid missing URLs.
Greater business flexibility: Within the same application, assign different tags to different scenarios. purgeing by tag affects only the specified scenario—such as a sales promotion page—without impacting other scenarios.
Consistent user experience: Ensure tightly coupled resources—such as frontend pages and their supporting static assets—update together. Avoid mismatches like new pages with old styles or partially outdated data.
Use cases
Common use cases include the following:
Updating e-commerce sales promotion pages and associated assets
Taking down special-topic content on news or media sites
Switching content for multilingual or multi-version sites
purgeing sub-application resources in a micro-frontend architecture
How it works
ESA uses HTTP headers as cache tags. A cache tag contains a header name and a header value separated by a colon:, for example, Cache-Tag:tag1,tag2,tag3. When you submit a task to purge the cache by tag:
ESA first determines whether the cache file on the POP is marked with a cache tag (default is
Cache-Tag). If the cache tag does not exist, ESA skips the purge operation. If it exists, ESA matches the cache tag value.ESA checks whether the tag value on the cached file matches the Purge Content you submitted. If it does not match, ESA skips the purge. If it matches, ESA purges the cache (default behavior: Mark as Expired).
ESA supports setting multiple cache tag values for the same resource, with values separated by English commas. When multiple cache tag values exist, ESA POPs normalize the received cache tag values:
Remove extra spaces:
tag1, tag2andtag1,tag2are treated as identical.Remove duplicate commas:
tag1,,,tag2andtag1,tag2are treated as identical.
Prerequisites
ESA's Purge cache by tag feature works by checking whether the cached content on ESA POPs contains specific cache tags. Therefore, when you use this feature, you must configure the origin server to add response headers that correspond to the cache tags for your resources. For configuration methods, see the following:
Procedure
In the ESA console, choose Site Management. In the Website column, click your target site.
In the navigation pane on the left, choose .
On the Purge Cache tab, configure the purge rule and click Submit:
Type: Select By Tag.
Purge Method: Select Mark as Expired or Delete.
Method
Description
Mark as Expired
If a user requests content that matches a resource to be purged, the ESA node first performs an origin fetch to get the resource's Last-Modified information. If it matches the cached resource, the cached resource is returned. If not, the node pulls the new resource from the origin, returns it to the user, and caches the new resource.
Delete
If a user requests content that matches a resource to be purged, the ESA node directly performs an origin fetch to pull the new resource, returns it to the user, and caches the new resource.
Purge Content: Enter the tag value to purge. Separate multiple values with
,, such asimages.

After submitting the purge task, you can view detailed records and progress of resource purging on the Purge Records tab. The purge task is complete when the progress reaches 100%. The progress varies with the number of objects that you want to purge. The purge task may require some time to complete.

Cache purge examples
When you update images or page files on an e-commerce website, you need to delete the files and purge the corresponding ESA cache. An e-commerce website may have many cropped versions of an image in different sizes. When you delete an image, enumerating all of its cropped versions is inconvenient. Therefore, you can batch-delete the image files and the corresponding ESA cache by the image name. In addition, when you prepare for a promotional event, you need to continuously iterate on the event page during development. When you publish a new version of the page, you can delete all related files and the corresponding ESA cache by a specified version. Purging cache by tag significantly improves cache management efficiency:
Purge by image name
Scenario
The following three images are cropped versions of the original dog.jpg. The origin adds the tag ESA-Cache-Tag:dog.jpg to responses for all three:
dog_100_200.jpgdog_200_200.jpgdog_300_200.jpg
The following three images are cropped versions of the original cat.jpg. The origin adds the tag ESA-Cache-Tag:cat.jpg to responses for all three:
cat_100_200.jpgcat_200_200.jpgcat_300_200.jpg
Delete the original images and purge all cached variants at the same time.
Configuration example
In the ESA console, choose Site Management. In the Website column, click your target site.
In the navigation pane on the left, choose .
In the Cache Tag section, click the Configuration button on the right.
Configure the Tag Name and the tag value case-insensitive parameter:
Tag Name: Select Use Custom Cache Tag Name and enter the custom tag name
ESA-Cache-Tag.Ignore Case: Enable or disable this setting as needed.

In the navigation pane on the left, choose .
On the Purge Cache tab, configure the purge rule and click Submit:
Type: Select By Tag.
Purge Method: Select Delete.
Purge Content: Enter the tag values to purge:
cat.jpg,dog.jpg.

Purge by version number
Scenario
The following six images were generated for version v0820. The origin adds the tag ESA-Cache-Tag:v0820 to responses for all six:
dog_100_200_v0820.jpgdog_200_200_v0820.jpgdog_300_200_v0820.jpgcat_100_200_v0820.jpgcat_200_200_v0820.jpgcat_300_200_v0820.jpg
Configuration example
In the ESA console, choose Site Management. In the Website column, click your target site.
In the navigation pane on the left, choose .
In the Cache Tag section, click the Configuration button on the right.
Configure the Tag Name and the tag value case-insensitive parameter:
Tag Name: Select Use Custom Cache Tag Name and enter the custom tag name
ESA-Cache-Tag.Ignore Case: Enable or disable this setting as needed.

In the navigation pane on the left, choose .
On the Purge Cache tab, configure the purge rule and click Submit:
Type: Select By Tag.
Purge Method: Select Delete.
Purge Content: Enter the tag value to purge:
v0820.

Cache tag description
Cache tag name
The default name is
Cache-Tag.A custom cache tag name must be 1 to 64 characters long.
A custom cache tag name can contain uppercase letters (
A–Z), lowercase letters (a–z), digits (0–9), and hyphens (-).
Cache tag values
Support multiple cache tag values. Separate values with
,.Minimum length is 1 byte.
No maximum length per value.
The number of cached tag values is limited to 1000.
Values must contain only UTF-8 encoded characters.
CacheTag values are case-sensitive by default. You can configure them to be case-insensitive using Configure Cache Tags.
Availability
Limit | Entrance | Pro | Premium | Enterprise |
Daily quota limit (units: tasks) | 2000 |
