If you want to set the TTL for static content cached on Alibaba Cloud CDN points of presence (POPs) based on the status code returned from an origin server, you can create a cache rule for the status code that honors origin.
Background information
When you create a status code expiration rule that honors origin, take note of the following limits:
If the
Expires
andCache-Control
headers are included in a response from the origin server, the TTL that is specified by the response headers overwrites that configured in the Alibaba Cloud CDN console.The TTL of a status code is measured in seconds.
You can configure the Status Code Expiration (Origin Cache Policy Prioritized) or Expire In parameter based on your business requirements.
Alibaba Cloud CDN supports only one status code expiration rule that honors origin. To set the TTL for multiple status codes, separate multiple key-value pairs with commas (,).
Procedure
Log on to the Alibaba Cloud CDN console.
In the left-side navigation pane, click Domain Names.
On the Domain Names page, find the domain name that you want to manage and click Manage in the Actions column.
In the left-side navigation tree of the domain name, click Cache.
Click Status Code Expiration.Status Code Expiration
In the Status Code Expiration (Origin Cache Policy Prioritized) section, click Create Rule.
Configure Rules.
Click OK.