I'm trying to understand more about the reading from the server and reading from the cache and what is billable.
In this answer to a similar question Alex states:
However, if you perform a query, "again and again", as long as it's the same query and nothing has changed on the server, then you will not be charged with any read operations. This is happening because the second time you perform the query, the results are coming from the cache.
How do we know that the second query (identical to the first) is coming from the cache when the snapshot.metadata.isFromCache
field is still false
? Another from Alex states similar thoughts here.
According to Doug in comments here he states:
The bottom line is this: unless you are offline or querying the cache explicitly, you are charged for all results that come from the server.
These seem to be opposing views. I understand I can explicitly query the cache, that's not in question. I'm just trying to understand if I run the same query 10 times and 10 documents are returned each time (similar to Alex's example/comment) will I be charged for 100 reads or 10? (assuming the network is available the whole time).
Any thoughts? Thanks in advance.