Cache Control Priority
Case 1: Cache /static/ for 1 day; cache all other contents for 1 minute.
- Create a cache policy: URL Path Prefix =
/, priority weight = 1, TTL = 60 seconds. - Create another cache policy: URL Path Prefix =
/static/, priority weight = 2, TTL = 86400 seconds.
Case 2: Cache /static/ for 1 day; cache .js files for 1 minute (including /static/*.js).
- Create a cache policy: URL Path Prefix =
/static/, priority weight = 1, TTL = 86400 seconds. - Create another cache policy: URL Path Suffix =
.js, priority weight = 2, TTL = 60 seconds. - In this configuration:
- Non-JSON files under
/static/are cached for 1 day. - JSON files under
/static/are cached for 1 minute, because the cache policy with the higher-priority (weight 2) overrides the policy with lower-priority (weight 1).
- Non-JSON files under