title: Firestore app read from cache not working
body: <p>I have setup my android firestore application similar to the <a href="https://github.com/firebase/friendlyeats-android/" rel="nofollow noreferrer">example quickstart application</a>, in other words:</p>
  
  <ul>
  <li><code>EntryActivity</code> displays documents in a collection</li>
  <li>When a document is clicked, pass the document ID to the <code>DetailsActivity</code></li>
  <li><code>DetailsActivity</code> uses it's own <code>FirebaseFirestore</code> reference to read that document with the ID</li>
  <li>Both the <code>EntryActivity</code> and <code>DetailsActivity</code> obtain their own <code>FirebaseFirestore</code> reference through <code>FirebaseFirestore.getInstance()</code> in <code>onCreate</code></li>
  </ul>
  
  <p>However since the document being opened was previously read in the <code>EntryActivity</code>, I want the <code>DetailsActivity</code> to read it from the local cache <strong>faster</strong> than if it were read from the server.</p>
  
  <p>In the <code>DetailsActivity</code>, when requesting the document from cache:</p>
  
  <pre><code>var time = System.currentTimeMillis()
  firestore.collection(collectionPath)
      .document(docId)
      .get(Source.CACHE)
      .addOnSuccessListener { snapshot -&gt;
          time = System.currentTimeMillis() - time
          Log.v(TAG, "read took $time ms fromCache=${snapshot.metadata.isFromCache}")
      }
  </code></pre>
  
  <p>Results in:</p>
  
  <pre><code>read took 300-500 ms fromCache=true
  </code></pre>
  
  <p>Reading from server:</p>
  
  <pre><code>var time = System.currentTimeMillis()
  firestore.collection(collectionPath)
      .document(docId)
      .get(Source.SERVER)
      .addOnSuccessListener { snapshot -&gt;
          time = System.currentTimeMillis() - time
          Log.v(TAG, "read took $time ms fromCache=${snapshot.metadata.isFromCache}")
      }
  </code></pre>
  
  <p>Results in:</p>
  
  <pre><code>read took 300-500 ms fromCache=false
  </code></pre>
  
  <p>These were run multiple times to come up with an average time for each. There is no noticeable difference in speed when reading from cache.</p>
  
  <p>To experiment I tried reading the document (after being already read) in the <code>EntryActivity</code> using the same <code>get(Source.CACHE)</code> method above, and it is faster like intended:</p>
  
  <pre><code>read took 30-80 ms fromCache=true
  </code></pre>
  
  <p>Why is reading from cache only faster in the first activity?</p>