Syndication feeds are polled millions of times daily by bot crawlers. Supporting conditional HTTP GET headers saves immense CPU and network throughput.
1. Caching Directive Hierarchy
- ETag Generation: Generating cryptographic MD5/SHA-1 hashes of the XML feed body and returning
HTTP 304 Not Modifiedon match. - Stale-While-Revalidate: Instructing edge CDNs to serve cached XML feeds instantly while revalidating origin content asynchronously in the background.
- Cache-Control Headers: Setting
max-age=900, public, s-maxage=3600on static XML and JSON syndication endpoints.