You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am thinking of sorting the characters of query string alphabetically to get a consistent arrangement of the query string.
That way, the search results are consistent regardless of the order of the query string parameters:
Cache search results.
I am thinking of sorting the characters of query string alphabetically to get a consistent arrangement of the query string.
That way, the search results are consistent regardless of the order of the query string parameters:
Notice that the above query string are not equal in ordering, but has equal parameters and values.
By sorting them alphabetically, we can confirm their equality:
We can then cache them as the sorted query string as the key and the result as the value.
Optionally, we may need to hash the key to get a consistent and small key length, as query strings lengths are inconsistent and may get very lengthy.
The text was updated successfully, but these errors were encountered: