let say I try to get a list of eventID that liked by the user by using Firestore listener. I also use offline persistence.
from this thread : Firestore - Using cache until online content updates
I know that the listener will be fired immediately with the results from the cache and if there is a change result, I will get another snapshot with the changes.
in swift, the reference to get the list is:
FirestoreDocumentReference.users(uidUser: uid).reference().collection("likedEvents").addSnapshotListener({ (snapshot, error) in )}
let say at first in the firestore database I have 100 eventID that liked by the user, and then the user like another 50 event, it means I have 150 liked eventID in the database now.
since there is a change in the database from 100 to 150, Firestore will check with the server right? and it will give me another snapshot.
my question is ....
Do I read 150 documents or just 50 documents after receiving new snapshot from firestore? I mean, Do I read all documents again or just changed document?
because read operation will affect the pricing of firestore