After the node cache expiration time is set and prefetch is completed, the request still cannot hit the node cache.
Cache-Control
field on the origin server is set to no-cache/no-store/private
.Note:URLs with infrequent file access have the risk of being removed from the node cache even they meet all cache rules.
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.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.
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.
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
.
Prefetch the resource to be cached again. After prefetch is completed, request the resource again.
Was this page helpful?