You can use this document to learn how to purge files from the CDN. A purge will remove cached files from all PoP locations. After a purge, the CDN will obtain a new copy of the affected files. This practice is useful if your files are updated or removed from the origin. If you do not purge files, then the CDN will decide when to send updated files to end users.
To learn how to purge from the CDN using our API, please see this document.
There are 2 purge options:
Once a file is purged, you cannot retrieve the removed data. As a result, StackPath recommends that you verify that your site does not has files that should stay cached.
For most websites, a purge will take place immediately, within 1 second.
When StackPath experiences a high load, a purge may take 1 to 2 minutes to complete.
View custom purge options
To access purge-related options:
- In the StackPath Control Portal, in the left-side navigation, click Sites.
- Locate and select the desired site.
- In the left-side navigation, click CDN.
There are 2 custom purge options:
|Purge by URL
Use Purge by URL option to purge individual files from cache.
To use this option, you must enter the URL of the exact file to purge.
After you make your changes, the specified files will be removed from all PoPs.
If you have the Dynamic Caching By Header option or the Use Vary Header option enabled, then you may have multiple cache keys. As a result, mark Purge Dynamic Content.
If the Pull Protocol setting is set to HTTP or HTTPS, then you must match the protocol that you want to purge.
|Purge by Path
Use Purge by Path:
With this option, all files downstream of the submitted path are purged.
This option is also known as recursive purge.
Unlike Purge by Path, the Purge Everything option is just a domain root recursive purge.