@@ -149,6 +149,19 @@ export const outlineAppCache: RuntimeCaching[] =
149
149
] ,
150
150
} ) ,
151
151
} ,
152
+ {
153
+ matcher : / \. (?: w a s m ) $ / i,
154
+ handler : new CacheFirst ( {
155
+ cacheName : "static-wasm-assets" ,
156
+ plugins : [
157
+ new ExpirationPlugin ( {
158
+ maxEntries : 48 ,
159
+ maxAgeSeconds : 7 * 24 * 60 * 60 , // 7 days
160
+ maxAgeFrom : "last-used" ,
161
+ } ) ,
162
+ ] ,
163
+ } ) ,
164
+ } ,
152
165
{
153
166
matcher : / \. (?: c s s | l e s s ) $ / i,
154
167
handler : new CacheFirst ( {
@@ -226,7 +239,7 @@ export const outlineAppCache: RuntimeCaching[] =
226
239
request . headers . get ( "Next-Router-Prefetch" ) === "1" &&
227
240
sameOrigin &&
228
241
! pathname . startsWith ( "/api/" ) ,
229
- handler : new CacheFirst ( {
242
+ handler : new NetworkFirst ( {
230
243
cacheName : PAGES_CACHE_NAME . rscPrefetch ,
231
244
plugins : [
232
245
new ExpirationPlugin ( {
@@ -241,7 +254,7 @@ export const outlineAppCache: RuntimeCaching[] =
241
254
request . headers . get ( "RSC" ) === "1" &&
242
255
sameOrigin &&
243
256
! pathname . startsWith ( "/api/" ) ,
244
- handler : new CacheFirst ( {
257
+ handler : new NetworkFirst ( {
245
258
cacheName : PAGES_CACHE_NAME . rsc ,
246
259
plugins : [
247
260
new ExpirationPlugin ( {
@@ -256,7 +269,7 @@ export const outlineAppCache: RuntimeCaching[] =
256
269
request . headers . get ( "Content-Type" ) ?. includes ( "text/html" ) &&
257
270
sameOrigin &&
258
271
! pathname . startsWith ( "/api/" ) ,
259
- handler : new CacheFirst ( {
272
+ handler : new NetworkFirst ( {
260
273
cacheName : PAGES_CACHE_NAME . html ,
261
274
plugins : [
262
275
new ExpirationPlugin ( {
@@ -269,7 +282,7 @@ export const outlineAppCache: RuntimeCaching[] =
269
282
{
270
283
matcher : ( { url : { pathname } , sameOrigin } ) =>
271
284
sameOrigin && ! pathname . startsWith ( "/api/" ) ,
272
- handler : new CacheFirst ( {
285
+ handler : new NetworkFirst ( {
273
286
cacheName : "others" ,
274
287
plugins : [
275
288
new ExpirationPlugin ( {
0 commit comments