Invalidate on response
taily-khucnaykhongquantrong opened this issue · 1 comments
taily-khucnaykhongquantrong commented
My server API doesn't return 400 - 500
response code to throw error. They use a specific response with structure such as { err: number; msg: string }
with 200
response code. I could use axios interceptor
to throw error, but that would not be cached. That's why invalidate on response is really important to me.
PS: I'm not using GraphQL
.
BombaCrazy commented
I had the same problem. found a better library where you can use a predicate to check if the request should be cached.
https://github.com/arthurfiorette/axios-cache-interceptor#requestcachecachepredicate