Cache Rule Suggestions
Default Cache Rules
- If Service Type is set to Website, File download, or On-demand services, and the origin server address is an IP address or origin domain, there are two default cache rules:
- Common dynamic files (such as PHP, JSP, ASP, and ASPX files): The default cache time to live (TTL) is 0. CDN pulls them from the origin server when receiving requests for them. You can modify and delete this rule.
- Other files: The default TTL is 30 days. You can modify but cannot delete this rule.
- If your origin server address is the domain name of an Object Storage Service (OBS) bucket, there is one default cache rule:
- All files: The default TTL is 30 days. You can modify but cannot delete this rule.
- You can add custom rules with a higher priority (a larger value) than the default rule. Then CDN will use the custom rules first.
- Shorter cache TTLs cause more frequent origin pulls, increasing the origin load and access latency. Set different TTLs to suit your individual scenarios.
- If Service Type is set to Whole site, there is a default cache rule for all files. In this rule, the TTL is 0. You can modify and delete this rule.
Suggestions
- Website acceleration
File Type
Recommended TTL
Dynamic files (PHP, ASPX, ASP, JSP, DO, DWR, CGI, FCGI, ACTION, ASHX, AXD, JSON)
0 (no cache)
SHTML, HTML, HTM, JS
7 days
Other static files
30 days
- Download acceleration
File Type
Recommended TTL
Dynamic files (PHP, ASPX, ASP, JSP, DO)
0 (no cache)
Static files (7Z, APK, WDF, CAB, DHP, EXE, FLV, GZ, IPA, ISO, MPK, MPQ, PBCV, PXL, QNP, R00, RAR, XY, XY2, ZIP, CAB)
30 days
- On-demand service acceleration
File Type
Recommended TTL
Dynamic files (PHP, ASPX, ASP, JSP, DO)
0 (no cache)
MWV, HTML, HTM, SHTML, HML, GIF, SWF, PNG, BMP, JS
7 days
MP3, WMA, 7Z, APK, WDF, CAB, DHP, EXE, FLV, GZ, IPA, ISO, MPK, MPQ, PBCV, PXL, QNP, R00, RAR, XY, XY2, ZIP, CAB
30 days
- Whole site acceleration
File Type
Recommended TTL
Dynamic files (PHP, ASPX, ASP, JSP, DO, DWR, CGI, FCGI, ACTION, ASHX, AXD, JSON)
0 (no cache)
Static files
30 days
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.