snapshotlistener

Firebase Does it cost to attach and detach SnapshotListener many times when there are no changes within 30 minutes?

自闭症网瘾萝莉.ら 提交于 2020-04-30 11:43:19
问题 I want to be able to stop snapshot listener when I don't need to listen for changes so later I can get all the updates at once. Is it possible to temporarily halt the snapshot listener? I think you have to remove it explicitly and reinitialize everything according to the doc. So I can explicitly call remove and reinitialize the snapshot listener to get changes, but is there a price penalty for doing this? I know reading cached values within 30 minutes doesn't cost anything, so does this mean

Firebase Does it cost to attach and detach SnapshotListener many times when there are no changes within 30 minutes?

爷,独闯天下 提交于 2020-04-30 11:43:12
问题 I want to be able to stop snapshot listener when I don't need to listen for changes so later I can get all the updates at once. Is it possible to temporarily halt the snapshot listener? I think you have to remove it explicitly and reinitialize everything according to the doc. So I can explicitly call remove and reinitialize the snapshot listener to get changes, but is there a price penalty for doing this? I know reading cached values within 30 minutes doesn't cost anything, so does this mean