@@ -11,7 +11,7 @@ workbox.precaching.precacheAndRoute([]);
11
11
// Index should be cached networkFirst - this way, users will always get the newest application version
12
12
const MAX_OFFILE_APP_AGE = 30 ; // Days
13
13
workbox . routing . registerRoute (
14
- new RegExp ( '/index\.html' ) ,
14
+ new RegExp ( '/index\\ .html' ) ,
15
15
workbox . strategies . networkFirst ( {
16
16
cacheName : 'base-asset-cache' ,
17
17
plugins : [
@@ -25,7 +25,7 @@ workbox.routing.registerRoute(
25
25
// Icons should be served cache first - they almost never change, and serving an old version is accepable
26
26
const MAX_SVG_ICON_AGE = 60 ; // Days
27
27
workbox . routing . registerRoute (
28
- new RegExp ( '/svg/.*\.svg' ) ,
28
+ new RegExp ( '/svg/.*\\ .svg' ) ,
29
29
workbox . strategies . cacheFirst ( {
30
30
cacheName : 'svg-icon-cache' ,
31
31
plugins : [
@@ -38,9 +38,9 @@ workbox.routing.registerRoute(
38
38
39
39
// API calls should always fetch the newest if available. Fall back on cache for offline support.
40
40
// Limit the maxiumum age so that requests aren't too stale.
41
- const MAX_OFFLINE_API_AGE = 30 ; // Days
41
+ const MAX_OFFLINE_API_AGE = 60 ; // Days
42
42
workbox . routing . registerRoute (
43
- new RegExp ( 'api\\.recipesage\\.com' ) ,
43
+ new RegExp ( 'https:// api\\.recipesage\\.com' ) ,
44
44
workbox . strategies . networkFirst ( {
45
45
cacheName : 'api-cache' ,
46
46
plugins : [
@@ -54,7 +54,7 @@ workbox.routing.registerRoute(
54
54
// S3 assets don't share ID's so we can cache them indefinitely
55
55
// Limit the cache to a maximum number of entries so as not to consume too much storage
56
56
workbox . routing . registerRoute (
57
- / c h e f b o o k . * p r o d .* s 3 . * a m a z o n a w s / ,
57
+ new RegExp ( 'https:// chefbook- prod.*amazonaws.com/' ) ,
58
58
workbox . strategies . cacheFirst ( {
59
59
cacheName : 's3-image-cache' ,
60
60
plugins : [
0 commit comments