Update cache management (#1382)

Change strategy of cache management. Today we don't have version of map building so we cannot use cache correctly. The idea is to have a less cache and keep HTPP cache management with GET method.

Signed-off-by: Gregoire Parant <g.parant@thecodingmachine.com>
This commit is contained in:
grégoire parant 2021-08-19 18:23:30 +02:00 committed by GitHub
parent 0bfac1a164
commit 1ffd198b00
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
let CACHE_NAME = 'workavdenture-cache-v1.4.14';
let CACHE_NAME = 'workavdenture-cache';
let urlsToCache = [
'/'
];
@ -14,7 +14,8 @@ self.addEventListener('install', function(event) {
});
self.addEventListener('fetch', function(event) {
event.respondWith(
//TODO mamnage fetch data and cache management
/*event.respondWith(
caches.match(event.request)
.then(function(response) {
// Cache hit - return response
@ -44,7 +45,7 @@ self.addEventListener('fetch', function(event) {
}
);
})
);
);*/
});
self.addEventListener('wait', function(event) {