Description: The deduplicate function in cacheStore prevents multiple identical network requests from running simultaneously. However, it doesn't cache the result in memory, meaning a subsequent call will trigger another fetch.
Proposed Enhancement: After a fetcher promise resolves, store its result in the memoryCache. This will allow subsequent get calls for the same key to be served instantly from memory, avoiding unnecessary network requests.
Description: The deduplicate function in cacheStore prevents multiple identical network requests from running simultaneously. However, it doesn't cache the result in memory, meaning a subsequent call will trigger another fetch.
Proposed Enhancement: After a fetcher promise resolves, store its result in the memoryCache. This will allow subsequent get calls for the same key to be served instantly from memory, avoiding unnecessary network requests.