When you enable the query string sorting feature, Edge Security Acceleration (ESA) automatically sorts the query string parameters in a URL when processing a request. ESA then uses the sorted query string to look up content in the cache or forward the request. This means that a point of presence (POP) treats requests as being for the same file if the parameters and their values are identical, regardless of their order in the URL. This feature helps improve the cache hit ratio.
Introduction
By default, the order of parameters in a query string affects cache behavior. The query string is the part of the URL that follows the ? character. If the parameters and their values are the same but in a different order, ESA caches them as separate resources. This can cause cache fragmentation and reduce cache efficiency.
For example, on an e-commerce site, a user might filter a product list with a query string. The following two URLs have the same parameters but in a different order:
https://www.example.com/products?title=0&color=red&size=mediumhttps://www.example.com/products?size=medium&color=red&title=0
Without query string sorting, ESA treats these as requests for two different resources. For the origin server, however, both URLs point to the same content. This makes it a good use case for query string sorting. With query string sorting enabled, ESA treats both requests as being for the same resource. The ESA POP needs to fetch the content from the origin server only once. Both requests can then hit the same cached resource on the POP. This improves cache utilization, enhances site performance and user experience, and reduces the load on your origin server.
Procedure
In the ESA console, select Site Management, and then click the target site in the Website column.
In the navigation pane on the left, choose .
Turn on the Sort Query Strings switch.

Global and feature-level rules
Global configurations apply to all requests for a site. If you want to enable this feature for only specific requests, create a rule-based configuration. Rules use conditions to match specific request parameters, which lets you apply the configuration only to those requests. The rule-based feature that corresponds to global query string sorting is Custom Cache Key.