[Store / Cache] The key from cacheOptions
is not used
#8516
Labels
🏷️ bug
This PR primarily fixes a reported issue
cacheOptions
is not used
#8516
When I fetch data from my JSON-RPC backend, the url is not changing but stays the same. This will basically kill caching because the key used for caching is the url. So the latest response overrides the rest.
Thankfully there is an option to add my own key to the
cacheOptions
however this key is never used. Even the code seems to have some checks for it, the key is never used.My first impression was
data/packages/store/src/-private/cache-handler.ts
Line 128 in 15049be
cacheOptions.key
isn't picked up. When I force it, further down the stream the key is changed back to the url.But as said in #8507 (comment) there are a few things in the way which have to be fixed. This is a reminder 🎗️ .
BTW, the key I generate is based on the
method
andparams
. Both together create a unique string from which I create a MD5 hash. That's the key I also send to the backend to uniquely identify the request.The text was updated successfully, but these errors were encountered: