A URL that contains a regular expression can be submitted in a refresh task. Alibaba Cloud CDN refreshes all URLs that match the regular expression. This feature enables targeted refresh.
On the Refresh Cache tab, if you set Object to Regular Expression and enter one or more URL refresh rules that contain regular expressions in the URL field, you can refresh all URLs that match the specified regular expressions. When you configure URL refresh rules that contain regular expressions, the following rules apply:
- You can specify URL refresh rules that contain only the following regular expressions in the URL field:
[0-9]
,[a-z]
,[^/]*
, and.*
. Do not specify URL refresh rules that contain other regular expressions in the URL field. - Enter one URL refresh rule per line. Example:
http://www.example.com/[0-9][a-z].*.jpg
. - You can use an Alibaba Cloud account to configure only one URL refresh rule at a time and up to 20 URL refresh rules per day. If you need to configure more URL refresh rules and the daily peak bandwidth of your Alibaba Cloud account exceeds 10 Gbit/s, you can Contact your account manager or contact us by other means. For more information, see Contact us. to request a quota increase.
- URL refresh, directory refresh, and refresh that contains regular expressions support shared cache. If shared cache is configured for a domain name, you can submit a refresh task with the primary domain name or any associated domain name to refresh the cache.
Procedure
- Log on to the DCDN console.
- In the left-side navigation pane, click Refresh & Prefetch.
- On the Refresh Cache tab, set Operation Method to Regular Expression.
- Configure the URL refresh rules, and click Submit.