2

I'm thinking of using on.value because I have to listen to all child_added, child_removed, child_changed in firebase. But I see that when above changes occur in firebase, the resulting snapshot is equal to the whole set of values I'm listening to.

I can see from this question that firebase has smart cache. So I want to know if on('value') also uses smart caching so that same values are not downloaded again. However, I can't find such issues in their documents.

Community
  • 1
  • 1
Duck Yeon Kim
  • 97
  • 2
  • 9
  • When you attach an `on("value"` listener it will immediately trigger with the current value of the node and subsequently every time the value changes. What is the "so that same values are not downloaded again" that you talk about here? – Frank van Puffelen Mar 21 '17 at 04:03
  • I need both current value and subsequent changes, I don't want subsequent changes to come with changes + previous data. I see that they have 'child_added', 'child_changed', 'child_deleted' but I hope i can do this with one on value instead – Duck Yeon Kim Mar 21 '17 at 04:06
  • Sorry, but I have a hard time understanding. If you can post the [minimal code that reproduces where you are stuck](http://stackoverflow.com/help/mcve), it may be easier to help. – Frank van Puffelen Mar 21 '17 at 14:56

0 Answers0