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

Resource Cache Failure

PDF
Focus Mode
Font Size
Last updated: 2024-12-30 22:05:36

Error Description

After the node cache expiration time is set and prefetch is completed, the request still cannot hit the node cache.

Cause

1. There are multiple cache rules, but their priorities are unclear.
2. "Follow origin server" is configured, but the Cache-Control field on the origin server is set to no-cache/no-store/private.

Solution

1. Set the cache rule priority correctly. You can set multiple CDN cache rules. The lower the rule position, the higher the rule priority. You need to ensure that the rule priority meets your expectation for the rules to take effect as expected.
2. Set the cache validity correctly. Check whether the cache validity set in the console is too short.
Note:
URLs with infrequent file access have the risk of being removed from the node cache even they meet all cache rules.
3. Check whether the cache rules meet your expectation.
Check whether the "Ignore Query String" setting in a CDN cache key rule causes a failure to cache the resources on the node.
Check whether "No cache" is set in a CDN node cache validity rule.
Check whether the header of the request from the origin server returns no-cache/no-store/private during origin-pull when the set CDN node cache expiration time is the same as that on the origin server.

Troubleshooting Procedure

1. Check the cache rule priority (the one at the bottom has the highest priority). Log in to the CDN console, select Domain Management on the left sidebar, locate the desired domain name, click Manage in the Operation column to enter the Domain Configuration page, switch to the Cache Configuration tab, and you can find the Cache Key Rule Configuration. As shown below, the priority of the rule where .jpg files are excluded for "Ignore Query String" is higher than that of the rule where "Ignore Query String" is configured for all files. You need to ensure that the business cache policies meet the priority settings.
2. Check the cache validity. Log in to the CDN console, select Domain Management on the left sidebar, locate the desired domain name, and click Manage > Cache Configuration > Node Cache Validity Configuration. As shown below, if the set cache validity is too short, the cache configuration may be mistaken as ineffective. Ensure that the cache configuration meets your business cache policies.
3. Check the cache policies. Check whether the policies in the cache key rule configuration and node cache validity configuration meet the expectation. If "Follow origin server" is configured, ensure that the Cache-Control field on the origin server is not set to no-cache/no-store/private.
4. Prefetch the resource to be cached again. After prefetch is completed, request the resource again.

Help and Support

Was this page helpful?

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

Feedback