@diabhoil yes, that's exactly what I started with, however the fetches happen all before the promises resolve, so the check fails for the URL. Maybe I just need to stick the promises in there.
@mariusor just tested with this const cachedFetch = (url) => { if(!dictionary[url]) { console.log("add to cache"); dictionary[url] = fetch(url); } else { console.log("just use from cache!"); } return dictionary[url]; } and it worked like expected when calling "await cachedFetch(url)"
@mariusor just tested with this const cachedFetch = (url) => { if(!dictionary[url]) { console.log("add to cache"); dictionary[url] = fetch(url); } else { console.log("just use from cache!"); } return dictionary[url]; } and it worked like expected when calling "await cachedFetch(url)"