<commit_before>// Service Worker can only cache files from folder or subfolder

const CURRENT_CACHE = 'pwa-v5';

self.addEventListener('install', function(e) {
 e.waitUntil(
   caches.open(CURRENT_CACHE).then(function(cache) {
     return cache.addAll([
       // '/',
       '/css/bootstrap.default.css',
       '/css/customizations.css',
       '/img/page/newsletter.jpg',
       '/img/page/profile.jpg',
       '/img/page/logo.png',
     ]);
   })
 );
});

self.addEventListener('fetch', function(event) {
  // All intercepted event whereas the files are in the same folder or subfolder
  event.respondWith(
    caches.match(event.request).then(function(response) {
      // All defined responses are in cache
      return response || fetch(event.request);
    }).catch(function() {
      console.log('Service Worker for PWA Error');
    })
  );
});

// Clean up old caches
self.addEventListener('activate', function(event) {
  event.waitUntil(
    caches.keys().then(function(cacheNames) {
      return Promise.all(
        cacheNames.filter(function(cacheName) {
          return cacheName !== CURRENT_CACHE
        }).map(function(cacheName) {
          return caches.delete(cacheName);
        })<commit_msg>remove logo from sw cache<commit_after>// Service Worker can only cache files from folder or subfolder

const CURRENT_CACHE = 'pwa-v6';

self.addEventListener('install', function(e) {
 e.waitUntil(
   caches.open(CURRENT_CACHE).then(function(cache) {
     return cache.addAll([
       // '/',
       '/css/bootstrap.default.css',
       '/css/customizations.css',
       '/img/page/newsletter.jpg',
       '/img/page/profile.jpg',
     ]);
   })
 );
});

self.addEventListener('fetch', function(event) {
  // All intercepted event whereas the files are in the same folder or subfolder
  event.respondWith(
    caches.match(event.request).then(function(response) {
      // All defined responses are in cache
      return response || fetch(event.request);
    }).catch(function() {
      console.log('Service Worker for PWA Error');
    })
  );
});

// Clean up old caches
self.addEventListener('activate', function(event) {
  event.waitUntil(
    caches.keys().then(function(cacheNames) {
      return Promise.all(
        cacheNames.filter(function(cacheName) {
          return cacheName !== CURRENT_CACHE
        }).map(function(cacheName) {
          return caches.delete(cacheName);
        })
{'fraction_non_alphanumeric': 0.1404890178201409, 'fraction_numerical': 0.0008288437629506838, 'mean_word_length': 2.990082644628099, '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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5779326', 'n_tokens_mistral': 708, 'n_tokens_neox': 699, 'n_words': 151}