/**
 * The cache name
 * @type {String}
 */
const cacheName = 'v6';

/**
 * Things to cache
 * @type {Array}
 */
const catCache = [
  '/service-worker/',
  '/service-worker/index.html',
  '/service-worker/manifest.json',
  '/service-worker/logo.png',
  '/service-worker/static/images/cat1.jpg',
  '/service-worker/static/images/cat2.jpg',
  '/service-worker/static/images/cat3.jpg',
  '/service-worker/static/images/cat4.jpg'
];

this.oninstall = (event) => {
  event.waitUntil(
    caches.open(cacheName)
      .then((cache) => {
        return cache.addAll(catCache);
      })
  );
};

this.onfetch = (event) => {
  event.respondWith(
    caches.match(event.request)
      .then(response => {
        if (response) {
          return response;
        }

        return fetch(event.request)
          .then((res) => {
            const r = res.clone();
            caches.open(CACHE_NAME)
              .then((cache) => {
                cache.put(event.request, r);
            });
          return res; // Don't wait for the request to cache
          });
      })
  );
};


@@ -47,23 +47,24 @@
 nst 
-cacheName
+CACHE_NAME
  = 'v
-6
+7
 ';%0A%0A
@@ -493,17 +493,18 @@
 pen(
-cacheName
+CACHE_NAME
 )%0A  
@@ -632,24 +632,58 @@
 ndWith(%0A    
+caches.open(CACHE_NAME)%0A    .then(
 caches.match
@@ -1085,24 +1085,24 @@
         %7D);%0A
-
       %7D)%0A  )
@@ -1086,29 +1086,35 @@
        %7D);%0A      %7D)%0A
+    )%0A
   );%0A%7D;%0A%0A

fix silly error