const CACHE_HASH = '';

self.addEventListener('install', () => {
    self.skipWaiting();
});

self.addEventListener('activate', () => {
    caches.keys().then(names => {
        for (let name of names)
            if (name.includes(CACHE_HASH))
                caches.delete(name);
    });
    self.registration.unregister();
});
