问题描述
我读了这个答案,Doug Stevenson(Firebase 工程师)说:
I read this answer, where Doug Stevenson (Firebase engineer) said:
缓存文档读取不收费.
但我阅读了文档:
此外,如果侦听器断开连接的时间超过 30 分钟(例如,如果用户下线),您将被收取读取费用,就像您发布了一个全新的查询一样.
所以如果我离线,即使我没有更改任何文档,我是否会再次收费?那么已经缓存的数据,30分钟后就不再考虑缓存数据了吗?
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!
推荐答案
如果缓存可以满足重新连接的查询,那么对于每个缓存的文档仍然没有读取费用.您仍需为查询本身支付单次读取费用,即使它返回的结果没有比缓存中的新结果还新.
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.
最低查询费用
对于您提出的每个查询,阅读一份文档的最低费用是执行,即使查询没有返回结果.
There is a minimum charge of one document read for each query that you perform, even if the query returns no results.
这篇关于Firestore 是否在离线 30 分钟以上时向我们收费?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!