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

Add delete_all/2 and count_all/2 functions to the Cache API #100

Closed
cabol opened this issue Jan 30, 2021 · 0 comments
Closed

Add delete_all/2 and count_all/2 functions to the Cache API #100

cabol opened this issue Jan 30, 2021 · 0 comments
Labels

Comments

@cabol
Copy link
Owner

cabol commented Jan 30, 2021

Add delete_all/2 and count_all/2 as part of the queryable behaviour.

  • delete_all/2: Deletes all entries matching the given query. If query is nil, then all entries in the cache are deleted.
  • count_all/2: Counts all entries in cache matching the given query. If the query is nil (the default), then the total number of cached entries is returned.

These new callbacks should replace size/0 and flush/0. For example, Cache.size() == Cache.count_all() and Cache.flush() == Cache.deletee_all().

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

No branches or pull requests

1 participant