Closed TimDaub closed 8 months ago
Hi, I noticed in your code you have ttl: 60, // 1 min
, however the ttl needs to be given in milliseconds, so it should be 60_000
for one minute. I think you have encountered a bug with very short TTLs which is fixable, and I'd also like to rename this property to ttlMs
and deprecate ttl
, but I think your case will be resolved simply by using the longer TTL that it seems you intended.
ah ok thanks. But I think I wish the library would have thrown (e.g. when the cache is being configured) if I define a ttl that is so small that it cannot internally handle the value.
also thx btw for looking into my code that's some really nice way of helping out I appreciate it!
👍 I intend to fix the bug so that it will work even with a 0ms TTL (though that would be a little silly).
Fixed in new version 3.1.4 just published to NPM, thanks :)
I'm requesting an endpoint as normally, however it seems there is an issue with node-fetch cache here because it throws internally. When I request the same endpoint with curl, it just works
I had this problem for a while, and then it magically went away and it seemed the value was available again etc.