Configure Status Code TTL (Honor Origin)

更新时间:
复制 MD 格式

Use the Status Code TTL (Honor Origin) feature to set the time-to-live (TTL) for static resources on CDN points of presence (POPs) based on origin response status codes.

Background

When you configure Status Code TTL (Honor Origin), note the following:

  • If response headers from the origin containexpires andcache-control, the TTL in the origin response overrides the configured status code TTL.

  • The TTL for a status code is measured in seconds.

Important
  • The Status Code TTL feature supersedes the Status Code TTL (Honor Origin) feature and provides more flexible options, such as rule conditions. We recommend using the Status Code TTL feature instead.

  • You can create only one rule entry. To specify rules for multiple status codes within the entry, separate them with a comma (,).

Procedure

  1. Log on to the CDN console.

  2. In the left navigation pane, click Domain Names.

  3. On the Domain Names page, find the target domain name and click Manage in the Actions column.

  4. In the domain's navigation pane, click Cache.

  5. Click the Status Code TTL tab.

  6. In the Status Code TTL (Honor Origin) section, click Create Rule.

  7. In the Status Code TTL (Honor Origin) dialog box, enter one or more rules in the Rule field. Format each rule as status code=TTL (in seconds), and separate multiple rules with a comma (,). For example, 4xx=3,200=3600,5xx=1. Then, click OK.

  8. Click OK. This action saves the configuration.