Cache Key Query Parameters and AMD

This behavior controls whether the query string (or portions of it) are used to differentiate objects in cache.

This behavior is automatically included in the Default Rule for a property configuration for AMD. Unlike other behaviors that are automatically included in this rule, it's not required. While we recommend you set it in the Default Rule—so that it will apply to all requests—you can remove it from this rule.

Before you begin

Before you work with this behavior—and all caching-related behaviors—we recommend that you read, About platform caching in the Property Manager help. It'll help you better understand caching and how it works within the Akamai network.

Let's set this up for AMD



The default setting for this behavior is Exclude all parameters. This means that all requests for the same URL are served from a single cache entry regardless of the query string in a request. For example, these two requests would be served from the same object in cache:

http://mymedia.com/directory/manifest?token=1234598765
http://mymedia.com/directory/manifest?token=9876512345

This setting tells Akamai to only consider the URL without the query string when looking in the cache. using the examples above, that is:

http://mymedia.com/directory/manifest

Confirm whether the Exclude all parameters setting is appropriate for your content. If you pick the appropriate setting for your environment, it'll optimize delivery by incorporating Akamai's “use case-based provisioning.”

Other available options include:

Behavior Description Parameters Exact Match
Include all parameters (preserve order form request) All of the query string parameters in a request are included, and they're applied in the order they exist in the request. N/A N/A
Include all parameters (reorder alphabetically) All of the query string parameters in a request are included, but they're reordered alphabetically and then applied. N/A N/A
Include only specified parameters... Only specific query strings are included, and all others are ignored. Enter the query string parameters you want included in the cache key. Matches are determined by prefix matching each query string. If the query parameter with its value (name=value&) contains an item in this list (for example, name, name=, name=value, or name=value&), then the parameter and value are included. It must also exactly match the case from the request URL, regardless of any other case-sensitivity settings. Decide if you want requests to apply an Exact Match:
  • Yes. Requests must include all query string values listed in Parameters, in the order input. For example, if you input firststring, secondstring, and thirdstring in Parameters, and set this to "Yes," requests must include a query string formatted as "?firststring=1234&secondstring=5678&thirdstring=91011" to have them included. If a request deviated from this order, all query strings are ignored.


  • No. The individual strings you set in Parameters are included for a request, regardless of their ordering in the query string. For example, assume you included x-string and y-string as Parameters and set this to "No." If a request includes the query string ?y-string=1234&a-string=5678&x-string=91011, both the x-string and y-string values are included, and the a-string value is ignored.


Exclude only specified parameters Specific query strings are excluded, and all others are applied. Enter the query string parameters you want excluded from the cache key. Matches are determined by prefix matching each query string. If the query parameter with its value (name=value&) contains an item in this list (for example, name, name=, name=value, or name=value&), then the parameter and value are excluded. It must also exactly match the case from the request URL, regardless of any other case-sensitivity settings. Decide if you want requests to apply an Exact Match:
  • Yes. Requests must include all query string values listed in Parameters, in the order input to be excluded. For example, if you input firststring, secondstring, and thirdstring in Parameters, and set this to "Yes," requests must include a query string formatted as "?firststring=1234&secondstring=5678&thirdstring=91011" to have them excluded. If a request deviated from this order, all query strings are included.


  • No. The individual strings you set in Parameters are excluded from a request, regardless of their ordering in the query string. For example, assume you included x-string and y-string as Parameters and set this to "No." If a request includes the query string ?y-string=1234&a-string=5678&x-string=91011, both the x-string and y-string values are excluded, and the a-string value is included.


Be careful when changing the cache key

If you change the cache key globally or for too many objects on a property that is already active—that is, if you create a new version that has a different cache key for all content—you can create problems for your origin when you activate the new version on production. When you change the cache key, you invalidate cached content that's using the existing cache key. Akamai edge servers will request new objects from your origin at a level that can create severe spikes in bandwidth.

If you need to change the cache keys on an active configuration, you should limit the changes: send them out a few changes at a time over an expanded time frame.