<commit_before>this.addEventListener('install', function (event) {
    event.waitUntil(
      caches.open('v2').then(function (cache) {
          return cache.addAll([
            './about_beta.js',
            './clock_beta.js',
            './index_beta.css',
            '/tomodoro/Content/break.mp3',
            '/tomodoro/Content/work.mp3',
            '/tomodoro/Content/icon.png',
            '/tomodoro/Content/clock.png',
            '/tomodoro/Content/mute.png',
            '/tomodoro/Content/play.png',
            '/tomodoro/Content/pause.png',
            '/tomodoro/Content/mute_hover.png',
            '/tomodoro/Content/play_hover.png',
            '/tomodoro/Content/pause_hover.png',
            '/tomodoro/Content/mute_active.png',
            '/tomodoro/Content/play_active.png',
            '/tomodoro/Content/pause_active.png'
          ]);
      })
    );
});
this.addEventListener('activate', function (event) {
    var cacheWhitelist = ['v2'];
    event.waitUntil(
      caches.keys().then(function (keyList) {
          return Promise.all(keyList.map(function (key) {
              if (cacheWhitelist.indexOf(key) === -1) {
                  return caches.delete(key);
              }
          }));
      })
    );
});
self.addEventListener('fetch', function(event) {
  event.respondWith(
    caches.match(event.request).then(function(response) {
      return response || fetch(event.request).then(function(response) {
        return caches.open('v2').then(function(cache) {
          cache.put(event.request, response.clone());
          return response;
        })
      })
    })
   );
});
<commit_msg>Iterate version and use a variable<commit_after>var version = 'v2.0.1';
this.addEventListener('install', function (event) {
    event.waitUntil(
      caches.open(version).then(function (cache) {
          return cache.addAll([
            './about_beta.js',
            './clock_beta.js',
            './index_beta.css',
            '/tomodoro/Content/break.mp3',
            '/tomodoro/Content/work.mp3',
            '/tomodoro/Content/icon.png',
            '/tomodoro/Content/clock.png',
            '/tomodoro/Content/mute.png',
            '/tomodoro/Content/play.png',
            '/tomodoro/Content/pause.png',
            '/tomodoro/Content/mute_hover.png',
            '/tomodoro/Content/play_hover.png',
            '/tomodoro/Content/pause_hover.png',
            '/tomodoro/Content/mute_active.png',
            '/tomodoro/Content/play_active.png',
            '/tomodoro/Content/pause_active.png'
          ]);
      })
    );
});
this.addEventListener('activate', function (event) {
    var cacheWhitelist = [version];
    event.waitUntil(
      caches.keys().then(function (keyList) {
          return Promise.all(keyList.map(function (key) {
              if (cacheWhitelist.indexOf(key) === -1) {
                  return caches.delete(key);
              }
          }));
      })
    );
});
self.addEventListener('fetch', function(event) {
  event.respondWith(
    caches.match(event.request).then(function(response) {
      return response || fetch(event.request).then(function(response) {
        return caches.open(version).then(function(cache) {
          cache.put(event.request, response.clone());
          return response;
        })
      })
    })
   );
});

{'fraction_non_alphanumeric': 0.15713425647200482, 'fraction_numerical': 0.003612281757977122, 'mean_word_length': 1.9829443447037702, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3887968', 'n_tokens_mistral': 992, 'n_tokens_neox': 993, 'n_words': 116}