File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,12 +60,13 @@ if (import.meta.env.PROD) {
6060 ]
6161
6262 registerRoute (
63- ( { sameOrigin, url } ) => sameOrigin && url . pathname . startsWith ( '/package/' ) ,
63+ ( { sameOrigin, url } ) =>
64+ sameOrigin && ( url . pathname . startsWith ( '/package/' ) || url . pathname . startsWith ( '/api/' ) ) ,
6465 new NetworkFirst ( {
6566 cacheName : cacheNames [ 0 ] ,
6667 plugins : [
6768 new CacheableResponsePlugin ( { statuses : [ 200 ] } ) ,
68- new ExpirationPlugin ( { maxEntries : 100 , maxAgeSeconds : 60 } ) ,
69+ new ExpirationPlugin ( { maxEntries : 1000 , maxAgeSeconds : 60 } ) ,
6970 ] ,
7071 } ) ,
7172 )
@@ -77,7 +78,7 @@ if (import.meta.env.PROD) {
7778 cacheName : cacheNames [ 1 ] ,
7879 plugins : [
7980 new CacheableResponsePlugin ( { statuses : [ 200 ] } ) ,
80- new ExpirationPlugin ( { maxEntries : 100 , maxAgeSeconds : 365 * 24 * 60 * 60 } ) ,
81+ new ExpirationPlugin ( { maxEntries : 1000 , maxAgeSeconds : 365 * 24 * 60 * 60 } ) ,
8182 ] ,
8283 } ) ,
8384 )
You can’t perform that action at this time.
0 commit comments