diff --git a/public/sw.js b/public/sw.js index 46fa48e8..ddf9f42d 100644 --- a/public/sw.js +++ b/public/sw.js @@ -33,9 +33,13 @@ const imageRoute = new Route( ); registerRoute(imageRoute); -// 1-day cache for /api/v1/instance and /api/v1/custom_emojis +// 1-day cache for +// - /api/v1/instance +// - /api/v1/custom_emojis +// - /api/v1/preferences +// - /api/v1/lists/:id const apiExtendedRoute = new RegExpRoute( - /^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis)/, + /^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis|preferences|lists\/\d+)/, new StaleWhileRevalidate({ cacheName: 'api-extended', plugins: [