- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
对我来说,Firestore 会向我收取本地缓存数据的读取查询费用,这似乎很奇怪,但我在 Firestore Pricing document 中找不到任何相反的说明。 。如果我强制 Firebase 进入离线模式,然后对本地缓存的数据执行读取,我是否仍需为检索的每个单独实体付费?
其次,我的应用中的离线用户向单个实体写入许多小更新。我希望每次更改都在本地保存(以防他们退出应用程序),但我只需要最终一致的保存到云中。当用户重新连接到互联网并且 Firestore 刷新本地更改时,我是否需要为该实体的单个写入请求付费,还是为我在离线状态下进行的每个更新
调用付费?
Firestore 可能非常适合我的用例,但如果离线读取和写入的收费与在线读取和写入的费用相同,那么这将不是一个负担得起的选择。
最佳答案
Cloud Firestore supports offline data persistence. This feature caches a copy of the Cloud Firestore data that your app is actively using, so your app can access the data when the device is offline. You can write, read, listen to, and query the cached data. When the device comes back online, Cloud Firestore synchronizes any local changes made by your app to the data stored remotely in Cloud Firestore.
因此,每个使用 Firestore 数据库并将 PersistenceEnabled 设置为 true 的客户端都会维护自己的数据库内部(本地)版本。当插入/更新数据时,它首先被写入数据库的本地版本。因此,对数据库的所有写入都会添加到队列
中。这意味着一旦您重新上线,存储在那里的所有操作都将提交到 Firebase 服务器上。这也意味着这些操作将被视为独立操作而不是整体。
但请记住,请勿将 Firestore 用作仅供离线使用的数据库。它实际上被设计为一个在线数据库,可以在短期到中期的断开连接期间工作。离线时,它将保留写操作队列。随着此队列的增长,本地操作和应用程序启动速度将会减慢。没什么大不了的,但随着时间的推移,这些可能会增加。
如果 Google Cloud Firestore
定价模型不太适合您的使用场景,请使用 Firebase 实时数据库
。正如本文post中也提到的那样根据 Firebase 官方博客,您可能仍想使用实时数据库的原因之一是:
As we noted above, Cloud Firestore's pricing model means that applications that perform very large numbers of small reads and writes per second per client could be significantly more expensive than a similarly performing app in the Realtime Database.
因此,选择哪个选项取决于您。
关于firebase - 离线缓存数据的 Firestore 定价说明,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47178737/
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 6 年前。
我对计算 Azure AD 价格中包含的术语感到非常困惑,甚至计算哪些定价层可以满足我的需求。由于我找不到对某些术语(如用户林)的良好解释,以及该用户林的时间代表什么。 我想购买 Azure AD 以
我在 Firestore 帮助中看到了下面的短语 document这让我很困惑。 “此外,如果监听器断开连接超过 30 分钟(例如,如果用户下线),您将像发出全新查询一样为读取付费。” 这是否意味着如
在创建新应用之前,我想确保我得到正确的定价模型。 例如,在电话簿应用程序中,我有一个名为 的集合。用户列表 有一个用户列表,这些用户是单个文档。 我的列表中有 50k 个用户,这意味着我的收藏中有 5
是否有类似于 AWS 用于产品列表和定价目录的 Azure 定价 API。例如,要获取 EC2 定价和产品目录,AWS 提供 JSON/CSV file ,想知道Azure是否有类似的东西 最佳答案
我已经建立了一个云 Composer 环境,但我对定价感到非常困惑。在定价页面中,写到任何环境都至少有 2 个 DB vCPU 和 2 个 Web 服务器 vCPU。 在页面的进一步部分,写到可以部分
假设我在一个集合中有 20 个文档,每个文档都有一个字段,其中包含用于查询的 View 数。下面的例子 collection |_document |_views:
我知道 Azure Functions 每月最多可免费执行 100 万次,并提供 400,000 GB 秒的空间。 这是每月按功能应用程序吗? 如果我有 3 个功能应用,每个月都可以免费获得此津贴吗?
这个问题已经有答案了: How would Azure storage be billed? (1 个回答) 已关闭 9 年前。 我对 Windows azure 非常陌生。我只是好奇用于排序或过滤
我想知道 Azure 费用是否仅适用于我使用过的资源,无论我在 Azure 虚拟机内是否托管了多个站点? 最佳答案 我认为你必须更具体一点。 通常,即使您不使用资源,云提供商也会根据您分配资源的时间收
根据 MS 的说法,有一个到本地数据网关的 Azure 服务总线组件,但是当您安装 Azure 组件时,没有创建服务总线资源。我们需要了解对定价的影响,即服务总线的价格是否隐藏在 Azure on p
价格计算器 Azure 不向我们显示选项,我们告知我们使用其服务的小时数。价格计算器 Windows Azure 是否计算该月每天 24 小时的使用时间? 如果我整个月每天访问 Windows Azu
我正在尝试了解 Azure 中数据库的成本。 我创建了一个弹性数据库池,它显示最多 200 个数据库和 100 个 eDTU 的每月费用为 R2580(南非兰特)。 如果我转到我在池中创建的任何数据库
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我正在尝试了解 Azure 中数据库的成本。 我创建了一个弹性数据库池,它显示最多 200 个数据库和 100 个 eDTU 的每月费用为 R2580(南非兰特)。 如果我转到我在池中创建的任何数据库
已关闭。这个问题是 off-topic 。目前不接受答案。 想要改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 已关闭10 年前。 Improve th
我正在创建一个带有 IAP 的应用程序,并且一切正常,包括每个区域都显示适合该区域的价格。例如,在美国,UIButton 上的 IAP 在英国以 $ 和 £ 显示价格。 我在我的应用程序中使用两个定价
我想使用 QuantLib 为负债组合定价,这些负债组合被建模为确定性的 future 现金流。我现在将它们建模为一条零息票的 FixedRateBonds,这似乎是一个非常不优雅的解决方案。 问题:
已结束。 这个问题是 off-topic 。它目前不接受答案。 想要改进这个问题吗? Update the question 所以它是 Stack Overflow 的 on-topic。 关闭 10
这个问题在这里已经有了答案: Does the Firebase Spark (free) plan work on a per project basis? (1 个回答) 关闭 1 年前。 配额
我是一名优秀的程序员,十分优秀!