Closed roccomuso closed 5 years ago
Indeed a dns cache layer would be helpful but as you mentioned it is not the purpose of this lib. cross-fetch is only a proxy for platform specific implementation of the Fetch api.
Also, mentioning lack of dns cache support in README would not be helpful. If this path is followed, the document should also mention all other features it does not support such as response cache, timeouts, jsonp, retries and so on. And I don't see why dns cache would be a special case.
That being said, I think it suffices to say that it just a cross implemention of the Fetch api.
One thing I'd suggest though is to create another lib that could wrap cross-fetch and add all the features that you want. That would be awesome.
Anyway, thanks for the issue!
I do understand that mabe it's not the purpose of this lib (feel free to close in case). But would be useful adding a dns cache layer. It's one of the common problem nowadays with huge number of requests using
node-fetch
. It doesn't cache anything. Or maybe it's worth just mentioning this in Readme.