Replace SWR with CacheFirst

This SWR strategy is sometimes too stale, possibly a bug with Workbox
This commit is contained in:
Lim Chee Aun 2024-07-28 16:07:22 +08:00
parent f1822d54af
commit 631730f2f2

View file

@ -101,7 +101,7 @@ const apiIntermediateRoute = new RegExpRoute(
// - trends/* // - trends/*
// - timelines/link // - timelines/link
/^https?:\/\/[^\/]+\/api\/v\d+\/(trends|timelines\/link)/, /^https?:\/\/[^\/]+\/api\/v\d+\/(trends|timelines\/link)/,
new StaleWhileRevalidate({ new CacheFirst({
cacheName: 'api-intermediate', cacheName: 'api-intermediate',
plugins: [ plugins: [
new ExpirationPlugin({ new ExpirationPlugin({