Fastly provides several levels of cache purging. You can purge something as small as a single URL via the "Purge URL" command or as large as all content under a service via the "Purge All" command. You can also selectively purge content via key-based purging using the "Purge Key" command. We also provide a purging feature called Soft Purge that allows you to mark content as outdated (stale) instead of permanently deleting it from Fastly's caches.
Purging via the user interface
To purge content using the Fastly application, follow the steps below.
- Log in to the Fastly application.
- Click the configure button (the wrench icon at the top of the window).
- From the Service menu, select the service you want to work on.
From the Purge menu button, select the appropriate purge type.
If asked to confirm your password, type your password in the confirmation window and click the Confirm button.
In the purging window that appears (see the examples below), provide the appropriate information to purge your content and then click the Purge button.
Purging a URL
To purge a single URL, select the domain from the Domain menu and type the path to the content in the Path field. For example, to purge
https://docs.fastly.com/example.jpg, you would select
docs.fastly.com from the Domain menu and type
/example.jpg in the Path field.
Purging with a key
Key-based purging of cache information allows you to include surrogate key headers with your content, which our caches strip out and index. You can then issue purge commands to selectively flush out anything with a specific surrogate key. For extra usefulness, items can have multiple keys that allow you to set up your own purging hierarchy.
To purge content tagged with a specific key, type that key in the Key field.
Surrogate-Keyheader with a list of keys for this URL. If you're using multiple keys, separate them with spaces.
For example, to tag a response with both the keys
bar you would send this header:
Surrogate-Key: foo bar
Purging all content
To instantly purge all content under your service, select the Purge All option. This clears all cached content for all domains on your service. Selecting this option displays a window asking you to confirm your decision.