I have users of my Flutter Firestore app and web site who monitor attendance of their schools and facilities. They typically will have their browsers open the entire day.
Because they manage the entire school, and because students are coming and going for different sessions, they monitor attendance throughout the day. I don't want to limit their functionality with pagination and need live snapshot listeners. I also cannot use cache, as I need realtime data, so I have cache completely turned off on my app and web site with Firestore. The data is minimal, the volume of documents is somewhat high, so reads cumulatively are excessive.
This is mainly because every 30 minutes, Firestore renews the listeners and these admins are running 500 plus reads, doing nothing every 30 minutes....24 hours a day if they leave their computers on. No, I can't ask customers to change behaviors.
So I'm looking for a trick. Is there a way to tweak this to either:
- keep the listener live without doing a full collection re-read.
- At minimum, extend the time or eliminate the timeout entirely so we don't re-read.
- I could I suppose do a timeout window that asks the user to refresh when they come back...however, I haven't found any flutterfire or firebase documentation on how to suspend the listeners (I do not want to mess with their authentication at all).
Based on everything I've seen, Firestore has this 30 minute, set in stone refresh. You can either log the user out entirely or live with it. That can't be the case, right? Any ideas?