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

Rename remove to delete? #17

Closed
adjourn opened this issue Dec 31, 2018 · 2 comments
Closed

Rename remove to delete? #17

adjourn opened this issue Dec 31, 2018 · 2 comments

Comments

@adjourn
Copy link

adjourn commented Dec 31, 2018

What do you think?

It would be compatible with Map API and we could easily swap caches without any huge rewrites. Not only that, we could use this library with other libraries that use Map as default cache, e.g wonderful dataloader.

Required methods are get, set, delete and clear.

PS! I haven't had time to test modified tiny-lru with dataloader yet but same API is still awesome IMO.

@adjourn
Copy link
Author

adjourn commented Dec 31, 2018

Oopsie, I was too hasty this time. LRU class has delete method but it's undocumented. Is it safe to use?

Im going to keep this issue open until I get confirmation. There must be a reason it's undocumented..

@avoidwork
Copy link
Owner

avoidwork commented Dec 31, 2018

@adjourn i think it was added for interop with lodash* a while a go. I'll add it to the README next time a change lands.

osdevisnot pushed a commit to osdevisnot/tiny-lru that referenced this issue Sep 26, 2019
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

2 participants