Object caching is triggered by requests. When a CDN node receives a request, and the cache of the requested object is not available, the request will be forwarded to the origin. Then the object is pulled and cached on the CDN node, and served to the requester.
You cannot directly manage resources cached on CDN nodes. However you can control caching by setting up node caching policies, for example, to ensure that the served resource is fresh.
Currently, a file up to 32 GB can be cached. Objects over 32 GB will be served from the origin.
Log in to the CDN console, select Domain Management in the left sidebar, locate the desired domain name, and click Manage -> Cache Configuration -> Node Cache Validity Configuration.
When you add a domain name, a node cache validity rule is added by default according to the acceleration type. You can change it if needed.
Node cache rules can be applied to specified file extension (such as
jpg;png), folders (such as
/test), and full-path files (such as
Cache-Controlheader of the origin server.
max-age, the max-age value will be used as the node cache validity.
no-cache/no-store/private, then the CDN node will not cache the resource.
Cache-Control, then the CDN node will not cache the resource.
Cache-Control: no-cache/no-store/privateof the origin server. It defaults to "No".
Cache-Controlfield of the origin server is
no-cache/no-store/private, then CDN nodes will not cache resources even the cache validity is configured.
If there is any legacy node cache validity configuration (i.e., the basic mode), it will be upgraded comprehensively once it is submitted as the advanced mode and can no longer be restored to the basic mode.
If no rule is configured or matches requests, the default policies will be applied:
Cache-Controlwill be followed.
Cache-Control, then the resource cache validity on nodes will be 600 seconds.
If the node cache validity configurations for the acceleration domain name
www.test.com are as follows:
The actual cache will be as follows:
no-cache/no-store/private, the validity of
www.test.com/abc.jpgis 10 days.
www.test.com/def.phpwill not be cached to nodes.