From 904e82872e7ca0b27ac4a5764482ffd30b9478a9 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 21 May 2023 08:36:59 +0800 Subject: [PATCH] Cache announcements --- public/sw.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/public/sw.js b/public/sw.js index 95121e3c..1f63d459 100644 --- a/public/sw.js +++ b/public/sw.js @@ -59,8 +59,9 @@ registerRoute(iconsRoute); // - /api/v1/custom_emojis // - /api/v1/preferences // - /api/v1/lists/:id +// - /api/v1/announcements const apiExtendedRoute = new RegExpRoute( - /^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis|preferences|lists\/\d+)$/, + /^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis|preferences|lists\/\d+|announcements)$/, new StaleWhileRevalidate({ cacheName: 'api-extended', plugins: [