At the moment I have document snapshots that are coming from my phone's cache. I know this from
print(document.metadata.isFromCache ? "NOT FROM NETWORK" : "FROM NETWORK");// document is a DocumentSnapshot
flutter: NOT FROM NETWORK
However I have deleted some of these documents off firestore, but they are still appearing. I would like to know if there is a way in which I can reset my cache for firestore in flutter so that all the documents are from the cloud.
Thanks for any help - much appreciated.
It sounds like a bug if a document shows up in a query where the source document has been deleted, if the app has connectivity and can synchronize with Firestore. If you can reproduce this situation with specific steps, the Firestore team might want your bug report.
If you just want to start with a clean cache for development, you can uninstall and reinstall the app to clear the cache.
On Android, there is a system option where you can clear app data (there might be a similar iOS option as well).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With