Updated on 2025-09-24 GMT+08:00

Forcible Cache

Description

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.

Working with TTL Source

Forcible cache works with the time to live (TTL) source based on these rules:

  1. 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 points of presence (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.
  2. 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.
  3. 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.
  4. When TTL Source is set to CDN and Forcible Cache is disabled:
    1. If no-cache, private, or no-store is set in the Cache-Control origin response header, CDN PoPs do not cache content.
    2. If no-cache, private, or no-store is not set on the origin server, CDN uses the cache TTL set on its console.
  5. When TTL Source is set to Whichever is shorter and Forcible Cache is disabled:
    • If the cache TTL set on the CDN console is shorter, the rule 4 is used.
    • If the cache TTL set on the origin server is shorter, the rule 1 is used.
  6. When TTL Source is set to Whichever is shorter and Forcible Cache is enabled:
    • If the cache TTL set on the CDN console is shorter, the rule 3 is used.
    • If the cache TTL set on the origin server is shorter, the rule 2 is used.