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

Use Keyv #15

Closed
lukechilds opened this issue Feb 5, 2018 · 4 comments
Closed

Use Keyv #15

lukechilds opened this issue Feb 5, 2018 · 4 comments

Comments

@lukechilds
Copy link
Sponsor

Are you interested in backing this with Keyv?

https://github.com/lukechilds/keyv

It would work in memory like it does currently but give users the option to use a persistent store like Redis/Mongo/Postgres/etc and share memoized results between servers/restarts.

It would also solve the memory leak issue in #14 via Keyv's built in TTL support.

@SamVerschueren
Copy link
Collaborator

I believe it should be done in a different package as it would make the entire API async and solves a different use case imo.

@lukechilds
Copy link
Sponsor Author

Ah, good point regarding async, hadn't considered that.

@sindresorhus
Copy link
Owner

Could maybe be added to https://github.com/sindresorhus/p-memoize instead, since it only supports promises.

@Kikobeats
Copy link

@lukechilds I'm trying to use keyv with mem (using async functions) but mem needs to use cache.has that is missing at keyv interface.

could be possible extend keyv to add a .has that basically should be based on .get?

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

No branches or pull requests

4 participants