tencent cloud

Content Delivery Network

Updates and Announcements
Release Notes
Announcements
User Tutorial
Product Introduction
Product Overview
Strengths
Use Cases
Term
Use Limits
CDN Performance Descriptions (Spot-check)
Purchase Guide
CDN Purchase Guide
ECDN Purchase Guide
Getting Started
Configuring CDN from Scratch
Adding Domain Names
CNAME Configuration
Domain Name Ownership Verification
FAQs about Domain Name Connection
Configuration Guide
Domain Management
Domain Name Configurations
Statistical Analysis
Purge and Prefetch
Log Management
EdgeOne
Service Query
Offline Cache
Permission Management
Permission Configuration
Console Permissions
Activate Real-time Logging as Sub-account/Collaborator
Use Cases
Accelerating Resources on COS with CDN
Practical Tutorial
Guide to Using the EdgeOne Tool for Migrating Content Delivery Network (CDN) Related Services
CDN - CVM
CDN - COS
Configuring CNAME via DNSPod
Regularly Storing CDN Logs
API Documentation
History
Introduction
API Category
Content Management APIs
Real-time Log APIs
Service Query APIs
Data Query APIs
Making API Requests
Log Query APIs
StopCdnDomain
Configuration Management APIs
Obsoleted APIs
Other APIs
Data Types
Error Codes
FAQ
Features
Billing
FAQs about Domain Name Connection
Cache Configuration FAQs
Purge and Prefetch
Statistical Analysis
FAQs about HTTPS
Connection
Errors
Troubleshooting Methods
Status Codes and Solutions
Node Cache Inconsistency
Slow Access Speed After CDN Activation
Low Traffic Hit Rate
404 Status Code
Page Display - CORS error
Resource Cache Failure
Service Level Agreement
Glossary

Status Code Cache Configuration

PDF
Focus Mode
Font Size
Last updated: 2024-12-30 21:36:38

Configuration Overview

Normally, when a CDN node successfully pulls a requested resource from the origin server (with a 2XX status code returned), the node will process the resource based on the rules in the node cache validity configuration. If the origin server is unable to process the non-2XX requests quickly, and you do not want all requests to be passed through to the origin server, you can configure the status code cache validity period. In this case, the CDN node will directly respond to non-2XX requests, helping reduce pressure on the origin server. Currently supported status codes are as follows:
4XX: 400, 401, 403, 404, 405, 407, 414
5XX: 500, 501, 502, 503, 504, 509, 514
Note:
For now, some platforms only supports 404 and 403 codes. We will complete server upgrade as soon as possible.
Currently, only the status codes 404 and 403 are supported in regions outside the Chinese mainland. If the acceleration region of a domain name is "Global", then the status code cache rules except for 404 and 403 will only take effect in the Chinese mainland.

Configuration Guide

Viewing configuration

Log in to the CDN console, select Domain Management on the left sidebar, click Manage on the right of a domain name to enter its configuration page, and switch to the Cache Configuration tab to find the Status Code Cache section. There is a default rule, which will cache 404 requests for 10 seconds.



Adding rules

You can click Add Rule to add status code cache rules as needed.


Configuration limitations
Each status code can only have one unique rule.
The cache time 0 means not to cache content.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback