what if two components make requests to the same URL?
NullVoxPopuli opened this issue · comments
NullVoxPopuli commented
like, if I want to use useFetch
in a HoC, and that HoC gets used in a few places -- at present, fetch will be invoked once per usage
Daishi Kato commented
As you might guess, this hook simply invokes fetch
and it doesn't have any caching mechanism by itself. It's up to browser how it's handled. The server may respond with different contents for the same URL (imagine a counter page). Browser could cache the content with proper response headers, but I'm not sure and I didn't experiment on it.
What do you think, and what is your expectation?
Daishi Kato commented
Daishi Kato commented
Closing this one. Feel free to reopen for further discussion.