Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deduplicate cache.set #9

Open
lorensr opened this issue Dec 18, 2019 · 2 comments
Open

Deduplicate cache.set #9

lorensr opened this issue Dec 18, 2019 · 2 comments
Labels
enhancement New feature or request

Comments

@lorensr
Copy link
Member

lorensr commented Dec 18, 2019

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

@lorensr lorensr added the enhancement New feature or request label Dec 18, 2019
@bitops
Copy link
Contributor

bitops commented Aug 21, 2021

@lorensr do you have any guidance on how this change could be implemented?

@lorensr
Copy link
Member Author

lorensr commented Aug 21, 2021

Not sure, but happy to look at pseudocode or a PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants