- Purge by URL (recommended) to remove content that belongs to a particular URL from the cache without impacting other cached items.
- Purge all to remove all data from the cache.
- Purge by pattern to remove content selectively by specifying path patterns with the operator that can replace any number of symbols.
Configure purge in the customer portal
1. Go to the Purge request section. A new page will open. Perform the remaining steps there. 2. Select the relevant CDN resource from the dropdown menu. 3. Select the desired purge type and follow the instructions below (by URL, all, or by pattern). 4. Click the Purge button.
WarningYou can make two purge requests per resource per minute. One purge request is limited to 100 URLs. Therefore, you can remove up to 200 files from the cache per minute.
- Start with a slash (/).
- Not include a protocol, domain name, or wildcard (*).
- Include query strings if the CDN resource cache is configured to consider the query string.
https://www.example.com/pictures/icon.jpg?size=small
, specify /pictures/icon.jpg?size=small
.
- Your origin contains a Vary HTTP response header. When you use Purge by URL, it will delete only one version of the file.
- Large file delivery optimization is enabled. When you update several files in origin without clearing the CDN cache, Purge by URL will delete only the first slice (with bytes=0…).
- If the value is “Ignore All”, don’t specify parameters in the Purge request.
- If the value is “Ignore All Except”, only files with the parameters listed in the option will be cached as different objects. Files with other parameters will be cached as one object. In this case, specify the listed parameters in any order in the Purge request. Other parameters shouldn’t be specified.
- If the value is “Ignore Only”, files with the parameters listed in the option will be cached as one object. Files with other parameters will be cached as different objects. In this case, specify other parameters (if any) besides the ones listed in any order in the Purge request.
Configure purge via API
We will explain in detail how to do “Purge by URL” via API calls. Examples of other Purge types (all and by pattern) can be found in the API documentation.API request details
API request details
Field | Value |
---|---|
Method | POST |
URL | https://api.gcore.com/cdn/resources/{{resource_id}}/purge |
URL parameter | resource_id ID of the CDN resource that the content to purge belongs to |
Header | Authorization: Bearer {{access_token}} Content-Type: application/json |
Payload | 1. Purge by URL:json<br/>{<br/> "urls": [<br/> "/example1.jpg",<br/> "/img/example2.png",<br/> "/style.css?ver=2.0"<br/> ]<br/>}<br/> 2. Purge all: json<br/>{<br/> "paths": []<br/>}<br/> 3. Purge by pattern: json<br/>{<br/> "paths": [<br/> "/images/*"<br/> ]<br/>}<br/> |
Request parameter | paths 1. Purge by URL: (required, string) An array of one or more content URLs to purge 2. Purge all: An empty array. 3. Purge by pattern: (required, string) An array of one or more content patterns started with * or / . |
Response | 201 Created Returns an array of the purged URLs 400 Bad Request The user has exceeded the URL quota 401 Unauthorized The user does not have the correct authentication credentials 429 Too many requests The user has exceeded the request quota |
**{{resource_id}}**
with your actual value.


{{ }}
with your actual values.



View purge history
InfoThis feature is currently in beta.

- Search by CNAME. Specify the CNAME of the desired CDN resource.
- Type. Select the needed type of Purge (Purge by URL, Purge all, or Purge by pattern).
- Status. Select the desired status (In progress, Success, Failed).
- Date. Set the time period for the queries to be displayed (up to one month).
