Change caching strategy for images.

This commit is contained in:
Dillon Kearns 2019-09-21 16:07:47 -07:00
parent 8448bb60b6
commit daaf47426e

View File

@ -30,7 +30,10 @@ workbox.routing.registerRoute(
);
workbox.routing.registerRoute(
/\.(?:png|gif|jpg|jpeg|svg)$/,
new workbox.strategies.CacheFirst({ cacheName: "images", plugins: [] }),
new workbox.strategies.StaleWhileRevalidate({
cacheName: "images",
plugins: []
}),
"GET"
);