Does the service worker cache support cache-control headers?
<p>Does the service worker cache support cache-control headers? For example, if an entry in the cache has the headers <code>cache-control: no-store</code> or <code>cache-control: max-age=60</code> are these respected by <code>match()</code>?</p>

<p>The following code outputs <code>CACHE HIT</code> despite the header <code>cache-control: no-store</code> appearing in the response. (I think the same problem applies to <code>max-age</code>.)</p>

<pre><code>function warm(c) {
  var req = new Request("/foo.txt");
  var res = new Response("hello", {
    status: 200,
    statusText: "OK",
    headers: new Headers({
      "cache-control": "no-store",
      "content-type": "text/plain"
    })
  });
  return c.put(req, res).then(function () { return c; });
}

function lookup(c) {
  return c.match(new Request("/foo.txt")).then(function (r) {
    return r ? "CACHE HIT" : "CACHE MISS";
  });
}

function deleteAllCaches() {
  return caches.keys().then(function (cacheNames) {
    return Promise.all(
      cacheNames.map(function (cacheName) {
        return caches.delete(cacheName);
      })
    );
  });
}

self.addEventListener('install', function (event) {
  event.waitUntil(
    deleteAllCaches()
    .then(caches.open.bind(caches, 'MYCACHE'))
    .then(warm)
    .then(lookup)
    .then(console.log.bind(console))
    .then(function () { return true; })
  );
});
</code></pre>