Parameters that follow the ? in a URL request can affect the cache hit ratio. When you enable the ignore parameters feature, DCDN nodes remove the parameters that follow the ? from the URL during cache matching to improve the cache hit ratio and reduce the number of back-to-origin requests.
Usage notes
Feature conflicts
If you configure the query string processing method in the Custom Cachekey feature and enable Ignore Parameters at the same time, the rule-level Custom Cachekey configuration takes precedence over the global Ignore Parameters configuration. The Ignore Parameters feature does not take effect for requests that match the cache rule.
If a cache rule has the query string processing method configured in the Custom Cachekey feature, the rule-level query string configuration takes precedence over the global Ignore Parameters setting. This makes the Ignore Parameters feature ineffective for requests that match that cache rule.
If you want the Ignore Parameters feature to take effect, make sure that no cache rule has the query string processing method configured in the Custom Cachekey feature.
Use Custom Cachekey as an alternative
The Custom Cachekey feature offers more flexible parameter control and can replicate all cache key configurations of the ignore parameters feature. We recommend that you use Custom Cachekey as an alternative. The following table compares the configuration methods for the two features.
Use case | Ignore parameters configuration | Custom Cachekey configuration |
Ignore all request parameters in the cache key. | Set ignore parameters to Passed and leave Retain Specified Parameters empty. | Add a request parameter processing policy: set the action to Yes and the parameter name to any non-existent parameter name. |
Retain only the request parameter | Set ignore parameters to Passed and set Retain Specified Parameters to | Add a request parameter processing policy: set the action to Yes and the parameter name to |
Delete only the request parameter | Set Delete Specified Parameters to | Add a request parameter processing policy: set the action to Delete and the parameter name to |
How it works
The ignore parameters feature includes two settings: ignore parameters and Retain Parameters in Back-to-origin Requests.
Ignore parameters
When enabled, DCDN POPs remove parameters that follow the
?in a URL during cache lookups. This allows requests for the same resource to match the same cache entry, even if they have different parameters.Use case
Description
A URL contains parameters, such as user IDs, that are irrelevant to the resource content.
For example, user A requests
http://example.com/1.jpg?uid=123and user B requestshttp://example.com/1.jpg?uid=654. If you enable ignore parameters, the DCDN POP useshttp://example.com/1.jpgfor the cache lookup, which allows both requests to hit the same cached file.Retain Parameters in Back-to-origin Requests
Use case
Description
You have enabled ignore parameters but need to pass user information to the origin server.
After you enable Ignore Parameters, DCDN by default uses the URL with its parameters removed for back-to-origin requests. After you enable Retain Parameters in Back-to-origin Requests, DCDN uses the original URL, including the parameters that follow the
?, for back-to-origin requests to pass user information to the origin server.
The ignore parameters feature has two modes: Retain Specified Parameters and Delete Specified Parameters. The following flowchart shows how DCDN processes requests when ignore parameters is enabled.
The URL signing feature takes precedence over the ignore parameters feature. DCDN performs URL signing validation before applying ignore parameters rules because the signature for Type A authentication is calculated using the original request parameters. For more information about how to configure URL signing, see Configure URL signing.
Procedure
-
Log on to the DCDN console.
-
In the left-side navigation pane, click Domain Names.
-
On the Domain Names page, find the target domain name and click Configure.
-
In the left-side navigation tree of the domain name, click Optimization.
In the Ignore Parameters section, click Modify, select a mode, and complete the configuration based on your requirements.
NoteSwitching modes deletes the existing configuration.
Mode: Retain Specified Parameters

Parameter
Description
Example
Parameter Filtering
Passed: Removes URL parameters that follow the
?to improve the cache hit ratio.NoteIf you set Parameter Filtering to Yes but leave Retain Specified Parameters empty, all parameters after the
?are removed.Rejected: Exactly matches the parameters after the
?in the URL.
Assume the original URL is
http://example.com/1.jpg?key1=1&key2=2&key3=3:Ignore all parameters and use the processed URL for back-to-origin requests
Configuration: Set Parameter Filtering to Passed, leave Retain Specified Parameters empty, and set Retain Parameters in Back-to-origin Requests to Rejected.
cache key:
http://example.com/1.jpgback-to-origin URL:
http://example.com/1.jpgRetain specified parameters and use the processed URL for back-to-origin requests
Configuration: Set Parameter Filtering to Passed, set Retain Specified Parameters to
key1, and set Retain Parameters in Back-to-origin Requests to Rejected.cache key:
http://example.com/1.jpg?key1=1back-to-origin URL:
http://example.com/1.jpg?key1=1Ignore all parameters and use the original URL for back-to-origin requests
Configuration: Set Parameter Filtering to Passed, leave Retain Specified Parameters empty, and set Retain Parameters in Back-to-origin Requests to Passed.
cache key:
http://example.com/1.jpgback-to-origin URL:
http://example.com/1.jpg?key1=1&key2=2&key3=3Retain specified parameters and use the original URL for back-to-origin requests
Configuration: Set Parameter Filtering to Passed, set Retain Specified Parameters to
key1, and set Retain Parameters in Back-to-origin Requests to Passed.cache key:
http://example.com/1.jpg?key1=1back-to-origin URL:
http://example.com/1.jpg?key1=1&key2=2&key3=3
Retain Specified Parameters
Configure up to 10 parameters to retain, and separate them with a comma (
,).If you set Retain Specified Parameters to
key1, only thekey1parameter in the URL is used for cache matching.Retain Origin Parameters
Passed: The back-to-origin request includes all parameters from the original URL.
Rejected: The parameters in the back-to-origin request are the same as the parameters in the cache key. Only the specified parameters are retained.
Compare the back-to-origin URLs in the third and fourth examples above.
Mode: Delete Specified Parameters
Parameter
Description
Example
Delete Specified Parameters
Specify the parameters to delete. You can specify up to 10 parameters, separated by spaces.
Assume the original URL is
http://example.com/1.jpg?key1=1&key2=2&key3=3:Delete specified parameters and use the processed URL for back-to-origin requests
Configuration: Set Delete Specified Parameters to
key1and set Retain Parameters in Back-to-origin Requests to Rejected.cache key:
http://example.com/1.jpg?key2=2&key3=3back-to-origin URL:
http://example.com/1.jpg?key2=2&key3=3Delete specified parameters and use the original URL for back-to-origin requests
Configuration: Set Delete Specified Parameters to
key1and set Retain Parameters in Back-to-origin Requests to Passed.cache key:
http://example.com/1.jpg?key2=2&key3=3back-to-origin URL:
http://example.com/1.jpg?key1=1&key2=2&key3=3
Retain Origin Parameters
Passed: The back-to-origin request includes all parameters from the original URL.
Rejected: The parameters in the back-to-origin request are the same as the parameters in the cache key. The specified parameters are deleted.
Compare the back-to-origin URLs in the first and second examples above.
Click OK.