With firestore, is it possible to configure offline persistence to set 'off' in a specific document?

后端 未结 2 994
离开以前
离开以前 2021-01-16 22:09

I need to set off the persistence in a certain document in Firestore; but all other documents should work with default configuration like this implementation. I have impleme

2条回答
  •  被撕碎了的回忆
    2021-01-16 22:21

    The way offline persistence works is by synchronizing the current state of each document written while offline. It doesn't synchronize the entire history of all the writes. The history of writes is irrelevant - what matters is only the current values in the document. Therefore, enabling persistence is not as expensive as you might be expecting.

    As Frank said, you can't selectively choose to synchronize only some documents. It's either entirely off or on. Personally, I don't think you have a compelling case to disable it.

提交回复
热议问题