File tree 1 file changed +15
-1
lines changed
1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,20 @@ workbox.setConfig({
11
11
12
12
// workbox.precaching.precacheAndRoute(self.__WB_MANIFEST);
13
13
14
+ // Assets
15
+ workbox . routing . registerRoute (
16
+ new RegExp ( ".html$" ) ,
17
+ new workbox . strategies . NetworkFirst ( {
18
+ cacheName : "assets-cache" ,
19
+ plugins : [
20
+ new workbox . expiration . ExpirationPlugin ( {
21
+ maxEntries : 50 , // Limit number of images cached
22
+ maxAgeSeconds : 1 * 24 * 60 * 60 , // 1 day
23
+ } ) ,
24
+ ] ,
25
+ } )
26
+ ) ;
27
+
14
28
// Images
15
29
workbox . routing . registerRoute (
16
30
new RegExp ( "s3." ) ,
@@ -19,7 +33,7 @@ workbox.routing.registerRoute(
19
33
plugins : [
20
34
new workbox . expiration . ExpirationPlugin ( {
21
35
maxEntries : 50 , // Limit number of images cached
22
- maxAgeSeconds : 30 * 24 * 60 * 60 , // 30 Days
36
+ maxAgeSeconds : 30 * 24 * 60 * 60 , // 30 days
23
37
} ) ,
24
38
] ,
25
39
} )
You can’t perform that action at this time.
0 commit comments