title: How can I configure Polymer's platinum-sw-* to NOT cache one URL path?
body: <p>How can I configure Polymer's platinum-sw-cache or platinum-sw-fetch to cache all URL paths except for /_api, which is the URL for Hoodie's API?  I've configured a platinum-sw-fetch element to handle the /_api path, then platinum-sw-cache to handle the rest of the paths, as follows:</p>
  
  <pre><code>&lt;platinum-sw-register auto-register
                        clients-claim
                        skip-waiting
                        on-service-worker-installed="displayInstalledToast"&gt;
    &lt;platinum-sw-import-script href="custom-fetch-handler.js"&gt;&lt;/platinum-sw-import-script&gt;
    &lt;platinum-sw-fetch handler="HoodieAPIFetchHandler"
                   path="/_api(.*)"&gt;&lt;/platinum-sw-fetch&gt;
    &lt;platinum-sw-cache default-cache-strategy="networkFirst"
                       precache-file="precache.json"/&gt;
    &lt;/platinum-sw-cache&gt;
  &lt;/platinum-sw-register&gt;
  </code></pre>
  
  <p>custom-fetch-handler.js contains the following.  Its intent is simply to return the results of the request the way the browser would if the service worker was not handling the request.</p>
  
  <pre><code>var HoodieAPIFetchHandler = function(request, values, options){
    return fetch(request);
  }
  </code></pre>
  
  <p>What doesn't seem to be working correctly is that after user 1 has signed in, then signed out, then user 2 signs in, then in Chrome Dev Tools' Network tab I can see that Hoodie regularly continues to make requests to BOTH users' API endpoints like the following:</p>
  
  <pre><code>http://localhost:3000/_api/?hoodieId=uw9rl3p
  http://localhost:3000/_api/?hoodieId=noaothq
  </code></pre>
  
  <p>Instead, it should be making requests to only ONE of these API endpoints.  In the Network tab, each of these URLs appears twice in a row, and in the "Size" column the first request says "(from ServiceWorker)," and the second request states the response size in bytes, in case that's relevant.</p>
  
  <p>The other problem which seems related is that when I sign in as user 2 and submit a form, the app writes to user 1's database on the server side.  This makes me think the problem is due to the app not being able to bypass the cache for the /_api route.</p>
  
  <p>Should I not have used both platinum-sw-cache and platinum-sw-fetch within one platinum-sw-register element, since the docs state they are alternatives to each  other?</p>