Amazon CloudFront introduces cache tag invalidation feature
Amazon CloudFront now supports invalidation of cached objects using cache tags, streamlining the process of removing related content from edge locations with a single request. This feature enhances cache management efficiency and is available in most AWS Regions.
Amazon CloudFront has introduced a new feature allowing the invalidation of cached objects using cache tags. This development enables the removal of groups of related content from CloudFront edge locations through a single invalidation request. The cache tag invalidation feature simplifies operational processes such as updating product data across various pages, managing legal takedown requests, addressing regulatory compliance needs, and refreshing content on multi-tenant platforms.
Prior to this update, invalidating related objects that did not share a common URL path required tracking individual URLs or employing broad wildcard patterns, which could inadvertently clear unrelated content. With the new cache tag invalidation capability, developers and site reliability engineers can assign tags to cached objects by including a specified header with comma-separated tag values in HTTP responses. This allows for the invalidation of all objects sharing a tag in a single request, ensuring high cache hit ratios while providing users with updated content in just seconds.
The header name can be configured via the Amazon CloudFront console, AWS CLI, or API, and multiple tags can be assigned per object for flexible and precise cache management. Over recent years, CloudFront has enhanced its propagation times, with invalidations now taking effect in under 5 seconds at the 95th percentile. The complete end-to-end process, including reporting the invalidation status, is completed in under 25 seconds at the 95th percentile.
This cache tag invalidation feature is available in all AWS Regions where CloudFront is offered, except in China (Beijing, operated by Sinnet) and China (Ningxia, operated by NWCD). For further information, users are encouraged to consult the Invalidations By Cache Tag documentation. Each cache tag is priced as one path, and pricing details are available on the CloudFront pricing page.