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
feat(useFirestore): support delay for autoDispose, fixes #2252 #2276
Conversation
I want the following tests 🙏
|
@kiyopikko I added tests and fix one bug |
Do you think we should make a setting for the dispose on read during timeout ? |
oh sorry, I imagined if true, |
Yes it's implemented like C but the Firebase SDK is re-using the data from the cache so it's like B. Yes D can happen that why I think we should add a setting for that that is not enabled by default ? |
It seems too much configuration so I think this would be sufficient just to be able to set a timeout. (removing this lines)
Simple and configurable is trade-off, This is just my opinion and I'm just a contributor. |
Or we add a |
how we access that option in component? (even in unmouted component) I think it needs more discussion but the below bug should be resolved soon. Can you (or can I) make a PR to fix only this? https://github.com/vueuse/vueuse/blob/main/packages/firebase/useFirestore/index.ts#L99 |
In the Yes I will make a PR to fix the issue |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@kiyopikko any chances to get this merge ? |
As I wrote in #2276 (comment), please remove
|
@kiyopikko I removed the autoDisposingReadLimit option |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Anybody can merge this PR please ? |
Description
Allow to add a delay on the autoDispose option to allow user to load the same document on a new page just after the document was previously loaded and disposed. This will allow to use the firestore document cache and avoid a Firestore read that cost around €0.06 for 100 000 document's reads and some network usage.
Additional context
We previously discuss about this feature on the issue #2252
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123
).