We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cloning do not work correctly with concurrency request: https://codesandbox.io/p/sandbox/j9cfcl
In this example I have changed "name" property in the request with "0" index key. Every next requests persist this change.
This is not happen if request do sequentially. To reproduce behavior - try runSequentially() and runSpreadly() functions in the code example.
runSequentially()
runSpreadly()
v1.6.0
any browser
v1.7.7
Memory Storage
Everything you can take in the Codesandox example.
The text was updated successfully, but these errors were encountered:
Workaround:
import axios from "axios"; import { buildMemoryStorage, setupCache } from "axios-cache-interceptor/dev"; const cachedAxios = setupCache(axios.create(), { storage: buildMemoryStorage(false), }); cachedAxios.interceptors.response.use((v) => { return { ...v, data: v.data !== undefined ? JSON.parse(JSON.stringify(v.data)) : undefined, } })
Sorry, something went wrong.
HI @bupy7, thanks for opening this request.
Would you want to open a PR? remember to add unit tests.
Taking a look at our existing unit tests is a good way to start and learn how its done.
Fixed in v1.6.1
arthurfiorette
Successfully merging a pull request may close this issue.
What happened?
Cloning do not work correctly with concurrency request: https://codesandbox.io/p/sandbox/j9cfcl
In this example I have changed "name" property in the request with "0" index key. Every next requests persist this change.
This is not happen if request do sequentially. To reproduce behavior - try
runSequentially()
andrunSpreadly()
functions in the code example.axios-cache-interceptor version
v1.6.0
Node / Browser Version
any browser
Axios Version
v1.7.7
What storage is being used
Memory Storage
Relevant debugging log output
The text was updated successfully, but these errors were encountered: