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 filed: [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, submit a ticket 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

  1. Log on to the Alibaba Cloud CDN console.
  2. Click Refresh & Prefetch.
  3. On the Refresh/Prefetch tab, set Operation Method to Regular Expression. RegEx
  4. Enter the URL refresh rules, and click Submit.