TTL Source
Description
TTL Source determines the cache time to live (TTL) used by CDN points of presence (PoPs). It defaults to the TTL set on CDN. Options include:
- Origin server: CDN PoPs use the cache TTL set on the origin server.
- CDN: CDN PoPs use the cache TTL set in cache rules on CDN.
- Whichever is shorter: CDN PoPs use the shorter TTL between the TTL set in cache rules on CDN and that set on the origin server.
- If both Cache-Control and Expires are configured on the origin server, Cache-Control is preferentially used.
- If TTL Source is set to Origin server, but neither Cache-Control nor Expires is configured on the origin server, CDN PoPs use the TTL set in cache rules on CDN.
Working with Forcible Cache
Forcible cache works with the TTL source based on these rules:
- When TTL Source is set to Origin server and Forcible Cache is disabled:
- If no-cache, private, or no-store is set in the Cache-Control origin response header, CDN PoPs do not cache content.
- If other cache directives are set on the origin server, the priority is s-maxage > max-age > expires. For example, if Cache-Control: max-age=500, s-maxage=400 is set on the origin server, CDN caches content for 400s.
- If the preceding cache directives are not set, CDN uses the cache TTL set on its console.
- When TTL Source is set to Origin server and Forcible Cache is enabled:
- If cache directives are set on the origin server, the priority is s-maxage > max-age > expires. For example, if Cache-Control: max-age=500, s-maxage=400 is set on the origin server, CDN caches content for 400s.
- If the preceding cache directives are not set, CDN uses the cache TTL set on its console.
- When TTL Source is set to CDN and Forcible Cache is enabled:
- CDN ignores response headers from the origin server and uses the cache TTL set on the CDN console.
- When TTL Source is set to CDN and Forcible Cache is disabled:
- If no-cache, private, or no-store is set in the Cache-Control origin response header, CDN PoPs do not cache content.
- If no-cache, private, or no-store is not set on the origin server, CDN uses the cache TTL set on its console.
- When TTL Source is set to Whichever is shorter and Forcible Cache is disabled:
- When TTL Source is set to Whichever is shorter and Forcible Cache is enabled:
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.