Have a scenario in which I need to sort the request parameters(XML POST Request ) in order to achieve best cache HIT possible with logically the same request parameters.
For e.g :
<xmlRequest>
<ProductSearch>
<RequestParameters>
<HotelCode>BAD</HotelCode>
<HotelCode>FGER</HotelCode>
<HotelCode>ASCF</HotelCode>
<HotelCode>DER</HotelCode>
<HotelCode>DVB</HotelCode>
<HotelCode>FRE</HotelCode>
</RequestParameters>
</ProductSearch>
</xmlRequest>
to
<xmlRequest>
<ProductSearch>
<RequestParameters>
<HotelCode>ASCF</HotelCode>
<HotelCode>BAD</HotelCode>
<HotelCode>DER</HotelCode>
<HotelCode>DVB</HotelCode>
<HotelCode>FGER</HotelCode>
<HotelCode>FRE</HotelCode>
</RequestParameters>
</ProductSearch>
</xmlRequest>
This helps me take care of any Perm/Combinations possible around these codes in different requests.
To what I can understand I need to write something in rewrite_by_lua(or equivalent) and then access individual codes out to write a sort logic and then re-create the request with sorted codes. Is there a way existing which could fasten it.
Regards,
Shubham