title: React Native fetch cache not working (cannot ENABLE caching)
body: <p>There are lots of questions regarding how to <em>disable</em> cache in React Native fetch. I seem to be stuck with the <em>reverse</em> problem - I have a server side API that has correct cache headers (caching is working fine for fetch calls in Google Chrome).</p>
  
  <pre><code>fetch('https://mywebsite.com/endpoint/', {
    method: 'GET',
    headers: {
      Accept: 'application/json',
      'Content-Type': 'application/json',
    }
  }).then((response) =&gt; {
     return response.json();
  }).then((responseJson) =&gt; {
       console.log(responseJson);
      // Response has a timestamp, and I can verify that it is always fresh
  });
  </code></pre>
  
  <p>Response headers visible in Chrome inspector:</p>
  
  <pre><code>Access-Control-Allow-Credentials: true
  Access-Control-Allow-Origin: *
  Cache-Control: max-age=172800
  Connection: Keep-Alive
  Content-Length: 2748
  Content-Type: application/json
  Date: Thu, 06 Dec 2018 08:55:55 GMT
  Expires: Sat, 08 Dec 2018 08:55:55 GMT
  Keep-Alive: timeout=5, max=998
  Pragma: cache
  Server: Apache/2.4.29 (Ubuntu)
  </code></pre>
  
  <p>Code on server (PHP):</p>
  
  <pre><code>$expires = gmdate("D, d M Y H:i:s", time() + AppConfig::mobileApiCacheTimeInSeconds) . " GMT";
  header("Expires: $expires");
  header("Pragma: cache");
  header("Cache-Control: max-age=" . AppConfig::mobileApiCacheTimeInSeconds);
  </code></pre>
  
  <p>However, in my react native application - the API calls are never cached. I read somewhere that caching is not guaranteed - but I expected that caching should work most of the times (device has enough memory - if that controls cache purging). I am also trying on an emulator, and see that calls are always made to server (never cached).</p>
  
  <p>Could it be because its a development build? Is caching disabled on emulator? I cannot find any documentation regarding this.</p>