Johans Bormman
Johans Bormman

Reputation: 905

Is Firestore charging us when offline more than 30 minutes?

I read this answer, where Doug Stevenson (Firebase engineer) said:

Cached document reads are not charged.

But I read in the docs:

Also, if the listener is disconnected for more than 30 minutes (for example, if the user goes offline), you will be charged for reads as if you had issued a brand-new query.

So if I'm going offline, even if I haven't changed any document, am I charged again? So the data that is already cached, isn't consider a cached data after 30 minutes anymore?

Hope someone can help me about this annoying situation. Thanks in advance!

Upvotes: 9

Views: 1285

Answers (1)

Doug Stevenson
Doug Stevenson

Reputation: 317750

If the cache can satisfy the reconnected query, then there are still no reads charged for each cached document. You are still charged a single read for the query itself, even if it returns no new results that are newer than what's in the cache.

Minimum charge for queries

There is a minimum charge of one document read for each query that you perform, even if the query returns no results.

Upvotes: 7

Related Questions