-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
Hi,
I've followed the same pattern for the connector in my own code. What I'm noticing though is that the requests never get to use the cache because the promises seem to always be pending.
Are you seeing this or perhaps this is an error in my code?
` return Promise.all(urls.map((url) => {
console.log("fetching", url);
const cachedRes = this.eTagCache[url];
if (cachedRes && cachedRes.eTag) {
options.headers['If-None-Match'] = cachedRes.eTag;
}
console.log("cache", this.loader); // cached promises are always pending
return new Promise((resolve, reject) => {
this.rp({
uri: url,
...options,
}).then((response) => { resolve(response) ... }.catch((err) => {reject(err) ... }`
Metadata
Metadata
Assignees
Labels
No labels