jsref
jsref copied to clipboard
http provider doesn't cache results
Hi. First of all, thanks for a great project!
I've noticed a potential issue:
Here it says Note that once a document is read, it WILL be cached for the duration of this object, unless you call Reset
but it doesn't actually call hp.mp.Set()
similar to how fs provider does.
I didn't test whether it actually makes requests on 2+ calls but the code looks like it will.
Yeah, it's missing a call to Set
. And now that I look at it, I'm not sure if I like the API either.
I'll think about it, but if you are up to it, maybe you could write up a failing test case using net/http/httptest
as the provider source? :D