Don't cache requests from SW in dev mode
This commit is contained in:
parent
b786ba9f4e
commit
b097387825
@ -82,6 +82,10 @@ global.self.addEventListener('fetch', (event) => {
|
|||||||
|
|
||||||
// For the other requests, try to match it in the cache, otherwise do a
|
// For the other requests, try to match it in the cache, otherwise do a
|
||||||
// network call
|
// network call
|
||||||
|
if (DEBUG) {
|
||||||
|
// Never match from cache in production
|
||||||
|
return;
|
||||||
|
}
|
||||||
const resource = global.caches.open(CACHE_NAME).then(
|
const resource = global.caches.open(CACHE_NAME).then(
|
||||||
cache => cache.match(request).then(
|
cache => cache.match(request).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user