To set a cache time-to-live (TTL) for specific requests, such as those based on file extensions or request header features, you can create custom rules. This lets you configure cache settings that are different from the global edge cache TTL policy.
Procedure
In the ESA console, select Websites, and in the Website column, click the target site.
In the left navigation pane, choose .
Click Create Rule and enter a Rule Name.
In the If requests match... area, configure the conditions that requests must match. For more information, see Composition of rule expressions.
In the Cache Eligibility section, specify whether to bypass cache. For more information, see Cache eligibility.
In the Edge Cache TTL area, click Configure to set the edge cache TTL for the custom cache rule.
-
Honor Origin TTL or Use Default Cache Rule: ESA honors origin cache directives. If none exist, ESA applies the default cache rule.
-
Honor Origin TTL or Do Not Cache: ESA honors origin cache directives. If none exist, ESA does not cache the resource.
-
Honor Origin TTL or Use Custom TTL: ESA honors origin cache directives. If none exist, PoPs use the TTL configured in ESA.
-
Do Not Cache: ESA does not cache origin resources, regardless of origin cache directives.
-
Use Custom TTL: ESA ignores origin cache directives and always applies your custom edge cache TTL.
-
Click OK.
Related documentation
Rule-related features vary in effective priority, reentrancy, and effective granularity. For details, see Properties of Rule-Related Features.