americanexpress / fetchye

✨ If you know how to use Fetch, you know how to use Fetchye [fetch-yae]. Simple React Hooks, Centralized Cache, Infinitely Extensible.
Apache License 2.0
41 stars 21 forks source link

Order query params for more cache hits #42

Open JAdshead opened 3 years ago

JAdshead commented 3 years ago

💡 Feature request

Is your feature request related to a problem? Please describe

Currently query params are required to be in the same order for a cache hit.

The following calls will not be considered the same and will result in unexpected cache misses: useFetchye('https://test.com/some-path?a=1&b=2') useFetchye("https://test.com/some-path?b=2&a=1')

Example

Oder of query params should not matter.

useFetchye('https://test.com/some-path?a=1&b=2') and useFetchye('https://test.com/some-path?b=2&a=1') will use the same cache entry

oneamexbot commented 3 years ago

This issue is stale because it has been open 30 days with no activity.

oneamexbot commented 2 weeks ago

This issue is stale because it has been open 30 days with no activity.