Help Center/ Content Delivery Network/ Drawer/ How Forcible Cache Works with TTL Sources
Updated on 2026-04-24 GMT+08:00

How Forcible Cache Works with TTL Sources

Forcible Cache determines whether to ignore the no-cache, private, and no-store directives in the Cache-Control response header of the origin server. When it is enabled, these directives are ignored. Forcible Cache works with TTL sources based on the rules described in Table 1.

Table 1 Effects of using Forcible Cache with TTL sources

TTL Source

Forcible Cache

Effect

Origin server

Disabled

  • If no-cache, private, or no-store is set in the Cache-Control response header of the origin server, CDN PoPs will not cache resources.
  • If other directives are set on the origin server, the cache 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 PoPs cache resources for 400s, as specified by s-maxage.
  • If none of these directives are set on the origin server, CDN uses the cache TTL set on its console.

Origin server

Enabled

The no-cache setting of the origin server is ignored. Resources are still cached even if no-cache, private, or no-store is set in the Cache-Control response header of the origin server. The cache logic is as follows:

  • If directives are set on the origin server, the cache 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 PoPs cache resources for 400s, as specified by s-maxage.
  • If none of these directives are set on the origin server, CDN uses the cache TTL set on its console.

CDN

Disabled

  • If no-cache, private, or no-store is set in the Cache-Control response header of the origin server, CDN PoPs will not cache resources.
  • If noun of no-cache, private, and no-store is set in the Cache-Control response header of the origin server, CDN uses the cache TTL set on its console.

CDN

Enabled

CDN ignores response headers from the origin server and uses the cache TTL set on the CDN console.

Whichever is shorter

Disabled

  1. When the cache TTL set on CDN is shorter:
    • If no-cache, private, or no-store is set in the Cache-Control response header of the origin server, CDN PoPs will not cache resources.
    • If noun of no-cache, private, and no-store is set in the Cache-Control response header of the origin server, CDN uses the cache TTL set on its console.
  2. When the cache time set on the origin server is shorter:
    • If no-cache, private, or no-store is set in the Cache-Control response header of the origin server, CDN PoPs will not cache resources.
    • If other directives are set on the origin server, the cache 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 PoPs cache resources for 400s, as specified by s-maxage.
    • If none of these directives are set on the origin server, CDN uses the cache TTL set on its console.

Whichever is shorter

Enabled

  1. When the cache TTL set on CDN is shorter, CDN uses it and ignores response headers from the origin server.
  2. When the cache time set on the origin server is shorter, the no-cache setting of the origin server is ignored. In this case, resources are still cached even if no-cache, private, or no-store is set in the Cache-Control response header of the origin server. The details are as follows:
    • If directives are set on the origin server, the cache 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 PoPs cache resources for 400s, as specified by s-maxage.
    • If none of these directives are set on the origin server, CDN uses the cache TTL set on its console.