Alibaba Cloud Content Delivery Network (CDN) allows you to set a time-to-live (TTL) value for HTTP status codes to expire static resources of specified file types or under specified directories. When a specified HTTP status code expires, relevant resources are deleted from CDN nodes. This topic describes how to create a TTL rule for HTTP status codes.
Background information
When you set a TTL value for HTTP status codes, take note of the following rules:
- The system does not cache the following HTTP status codes: 303, 304, 401, 407, 600, and 601.
- If the response returned by the origin server carries the HTTP status code 204, 305, 400, 403, 404, 405, 414, 500, 501, 502, 503, or 504 and the Cache-Control header, the TTL value of the HTTP status code is specified by the Cache-Control header. If the response does not carry an HTTP status code, the default TTL value is one second.
- If you have set a status code TTL for resources of specified file types and for resources under specified directories, whichever created first takes effect.