Skip to content

Inquiry on optimizing local cache sync when resuming a query #12270

Answered by dconeybe
KhaledShehadeh asked this question in Q&A
Discussion options

You must be logged in to vote

tl;dr No, the PR you mentioned, #11457, does not make the lastUpdated/deleted workaround obsolete. That workaround still has the benefit of reducing billed document reads.

The optimization in #11457 improves upon how Firestore internally implements a solution to the problem that your workaround solves using the deleted property. It does not, however, solve the optimization gained by using the lastUpdated property.

Background Information

Whenever Firestore executes a query, the server's response includes a "resume token". This resume token is saved into the client's local persistence along with the document data that was received. If the query is later executed again then the client includ…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@KhaledShehadeh
Comment options

Answer selected by KhaledShehadeh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants