How do I prevent users from accessing stale cached content?
Cause
ESA edge nodes cache files by name. When a file on your origin server is updated without a name change, edge nodes cannot detect the update and continue serving the old cached version.
Solutions
ESA provides two approaches to keep cached content current:
Use versioned file names instead of overwriting files in place. For example, name successive versions
img-v1.0.jpgandimg-v2.1.jpg. This ensures edge nodes always fetch the correct version.If you must update a file with the same name, submit a refresh request from the console or via the OpenAPI. See Refresh Cache for file-level invalidation and Prefetch Cache for pre-warming the cache after a refresh. Directory-level refresh is also supported — see Refresh methods supported by different service plans. If content remains stale after using the ESA refresh and prefetch feature, see Accessed resources are not updated after using the ESA refresh and prefetch feature.