This feature determines whether the cache-key will include or exclude query string parameters associated with a request.
Key information:
Type | Description |
---|---|
Include | Indicates that each specified parameter should be included in the cache-key. A unique cache-key will be generated for each request that contains a unique value for a query string parameter defined in this feature. |
Include All | Indicates that a unique cache-key will be created for each request to an asset that includes a unique query string. This type of configuration is not typically recommended since it may lead to a small percentage of cache hits. This will increase the load on the origin server, since it will have to serve more requests. This configuration duplicates the caching behavior known as "unique-cache" on the Query-String Caching page. |
Exclude | Indicates that only the specified parameter(s) will be excluded from the cache-key. All other query string parameters will be included in the cache-key. |
Exclude All | Indicates that all query string parameters will be excluded from the cache-key. This configuration duplicates the default caching behavior, which is known as "standard-cache" on the Query-String Caching page. |
Tip: The power of HTTP Rules Engine allows you to customize the manner in which query string caching is implemented. For example, you can specify that query string caching only be performed on certain locations or file types.
Note: If you would like to duplicate the query string caching behavior known as "no-cache" on the Query-String Caching page, then you will need to create a rule that contains a URL Query Wildcard match option and a Bypass Cache feature. The URL Query Wildcard match option should be set to an asterisk (*).
Sample usage for this feature is provided below. A sample request and the default cache-key are provided below.
Sample configuration:
This type of configuration would generate the following query string parameter cache-key:
Sample configuration:
This type of configuration would generate the following query string parameter cache-key:
Sample configuration:
This type of configuration would generate the following query string parameter cache-key:
Sample configuration:
This type of configuration would generate the following query string parameter cache-key: