geofirex icon indicating copy to clipboard operation
geofirex copied to clipboard

Support data from server or cache

Open azurechen opened this issue 4 years ago • 0 comments

The most common example is search result list.

Usually, the search result list should return the first updated data using get function because we don't want that the list is always changing.

Therefore the source option is very important. If the first return data is from cache. It means no chance to get updated data from server again by using get function.

Provide a source option can help developer to customize the cache policy. please refer the following document. https://firebase.google.com/docs/reference/js/firebase.firestore.GetOptions

And also the includeMetadataChanges: true setting is necessary. the reason is below: https://firebase.google.com/docs/firestore/manage-data/enable-offline

azurechen avatar Apr 08 '20 20:04 azurechen