Skip to content

fix: add force option to invalidate callback #167

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

Merged
merged 5 commits into from
Jun 2, 2021

Conversation

bennypowers
Copy link
Contributor

Fixes #166

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jun 1, 2021

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit f25790a:

Sandbox Source
Hybrids web components playground Configuration

@coveralls
Copy link

coveralls commented Jun 1, 2021

Coverage Status

Coverage remained the same at 100.0% when pulling f25790a on bennypowers:fix/force-invalidate into 1a7ab52 on hybridsjs:master.

@smalluban
Copy link
Contributor

Hi @bennypowers! Look promising, It might help binding with external libraries. I like idea to mix up arguments of cache.invalidate() to one options object with clearValue, deleteValue -> deleteEntry and new force. However, it will require updating places where cache is used. Also, we need to update types/index.d.ts according to the changes.

Are you willing to do that, or should I merge your PR to the working branch and continue changes?

@smalluban smalluban changed the title feat: add force option to invalidate callback fix: add force option to invalidate callback Jun 1, 2021
@bennypowers
Copy link
Contributor Author

I'll give it a shot just now, I've got the repo up and running locally. I have to step out in a few hours, so I'll push what I have at that time and ping you on gitter.

Thanks for the review!

@bennypowers
Copy link
Contributor Author

@smalluban latest commit combines options into a single object. I only documented the force option, since I'm not sure how to explain the other two, or whether you wish them to be public. If you want, please add some docs to the table, or alternatively, remove them from the typescript declaration, or just leave it as-is if you like

@bennypowers
Copy link
Contributor Author

Side note: this options object could be expanded in the future, e.g. a sync option

@bennypowers
Copy link
Contributor Author

I implemented those suggestions but test fail now, can you take a look?

@smalluban smalluban merged commit c82e380 into hybridsjs:master Jun 2, 2021
@bennypowers bennypowers deleted the fix/force-invalidate branch June 2, 2021 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

invalidate callback should take a { force: boolean } optional param
3 participants