function removeOldCache() {
    return caches.keys()
      .then( keys => {
        return Promise.all(keys
          .filter(key => key.indexOf(VERSION) !== 0 )
          .map(key => caches.delete(key) )
        );
      });
  }
// function to remove old caches that don't match the current cache version
function to remove old caches that don't match the current cache version
function to remove old caches that don ' t match the current cache version
function removeOldCache() {
    return caches.keys()
      .then( keys => {
        return Promise.all(keys
          .filter(key => key.indexOf(VERSION) !== 0 )
          .map(key => caches.delete(key) )
        );
      });
  }
function removeOldCache ( ) { return caches . keys ( ) . then ( keys => { return Promise . all ( keys . filter ( key => key . indexOf ( VERSION ) !== 0 ) . map ( key => caches . delete ( key ) ) ) ; } ) ; }
function to remove old caches that don't match the current cache version
function to remove old caches that don ' t match the current cache version