Open lorensr opened 4 years ago
Currently if a request triggers N findOneById(123) calls (all with the same id), and the cache is empty, there will be N calls to cache.set(123, doc). It would be nice if we could deduplicate that, like DataLoader memoizes .load
findOneById(123)
cache.set(123, doc)
.load
@lorensr do you have any guidance on how this change could be implemented?
Not sure, but happy to look at pseudocode or a PR
Currently if a request triggers N
findOneById(123)
calls (all with the same id), and the cache is empty, there will be N calls tocache.set(123, doc)
. It would be nice if we could deduplicate that, like DataLoader memoizes.load