Cache ID Modification
This behavior controls which query parameters, headers, and cookies form the cache key identifier.
The Cache ID Modification behavior overrides how nesting usually works within rules. When a rule contains this behavior, any other instances of the behavior specified in a parent rule or prior executing sibling rules no longer apply. When a rule has no Cache ID Modification behavior, the set of behaviors specified in a parent or prior sibling rule determines how to form cache keys for that content.
How it works
Cache ID Modification takes the cache control options beyond regular path, filename, and query parameters. With this behavior enabled, you can add any specific header or cookie values to the cache key. For example, you can use the Accept-Language
header to cache different versions of a single URL that's been localized.
Features and options
Field | What it does | Sub-options |
---|---|---|
Action | Specifies how to modify the cache ID. |
|
Include Values | With Action set to one of the following:
|
|
Require Included Elements | With Action set to one of the following:
|
|
Elements to include | With Action set to one of the following:
| |
Variable | With Action set to:
|
Tips and best practices
You can apply several instances of this behavior to a rule to cache various inputs. For example, if you want to include both headers and cookies in the cache ID, you need to add two instances of this behavior, one for each type of input.
Updated 6 months ago