Purge: purge some or all assets from CDN resource cache

Situations, when it is needed to clear cache at CDN servers, are

  • You have renewed all content or part of content.
  • Data is not displayed correctly.

There are 2 ways to clear cache:

  1. You can use API. Read more on API
  2. You can do it in the G-CDN control panel in the Purge section.


Clear cache in the control panel

1. Log in to your control panel.
2. Find Purge on the left side of the control panel

chrome_2017-06-09_16-51-16.png
3. Choose a CDN Resource for which you need to clear the cache.


4. Choose a purge method which you would like to use.

Screenshot-2018-1-1_G-Core_Labs___________CDN-________________.png

Selective purge

In the input line specify the path to the file you want to purge or a path pattern without a domain name.

For purging by pattern use the * operator, which replaces any number of symbols in your path (you can use several * operators in one request). A path must start with the / or the * symbols.  Each path must be on a separate line.

If you don’t specify a query string, files with all the possible query strings will be purged from the cache according to the path pattern.

Purge calls limitations:

  • You can make 1 purge request per minute.
  • One purge request is limited to 10 patterns.

A request for purge will be formed within one minute. Then it will be sent to the CDN servers. Purging time depends on the number of files/paths and usually does not take longer than 15 minutes.

 

How to clear the cache of the selected file:  cdn.site/static/image.jpg

Specify a file path without a domain name: /static/image.jpg.

As a result, all files at cdn.site/static/image.jpg will be purged, including files with query string .jpg?VERSION.

If you want to purge only a selected file with a query string, specify it in the file path: /static/image.jpg?VERSION.

 

How to clear cache for the group of files located at cdn.site/static

 Input pattern without domain name and * operator: /statiс/*.

 

How to clear cache for the group of .jpg files

Input the * operator and the file name extension .jpg: *.jpg.

As a result, all the jpg files will be purged, including files with the query string .jpg?VERSION

 

How to clear cache for the group of files having /static/ in the path

 Input path pattern without a domain name and use * operator twice: */static/*

 

How to clear cache for the group of .jpg files having /static/ in the path

Input path pattern with the * operator: */static/*.jpg

Click Purge to start the purging.

 

Purge All

Use it to purge all files from the CDN servers for a ResourceChoose Purge all files from the CDN Resource and click Purge to start the procedure. 

When you purge all files from cache, CDN servers pull these files from the origin that might cause a significant load on your server. If you have a large amount of content, we recommend using our API.

 

Was this article helpful?
Recently viewed articles