title: Firebase 3 update local cache
body: <p>I'm working on an iOS app that receives data from Firebase database. I need to keep a local version of the DB and I found really awesome the offline capability of Firebase. Now,</p>
  
  <ol>
  <li>Is there any way to disable auto sync and only update when the user click some button?</li>
  <li>Is there any way to only update new or modified elements instead of re-download everything?</li>
  </ol>
  
  <p>2-bis. Is there any way to know each element that has been added/modified?</p>
  
  <ol start="3">
  <li>Does FIRDataSnapshot conform to NSCoding protocol? I'd like to save it locally in a plist file...</li>
  </ol>
  
  <p>EDIT: </p>
  
  <p>After reading more in Firebase 3 documentation, I'm now looking to get all DB tree in a single request, is it possible?</p>
  
  <p>My code is the following</p>
  
  <pre><code>    FIRDatabaseReference.goOnline()    
      var firebase = FIRDatabase.database().referenceWithPath("items")
              firebase.observeEventType(.Value, withBlock: { snapshot in
  
                  print(snapshot.value)
  
                  if let snapshots = snapshot.children.allObjects as? [FIRDataSnapshot] {
  
                      for snap in snapshots {
  
                          if let postDictionary = snap.value as? Dictionary&lt;String, AnyObject&gt; {
  
                             print ("item received")
                          }
                      }
                  }
              }) 
  FIRDatabaseReference.goOffline()
  </code></pre>