This caching seems still buggy

Revert to SWR with 1-min expiry
This commit is contained in:
Lim Chee Aun 2024-08-03 19:14:04 +08:00
parent cf2461add5
commit 4ebfb544aa

View file

@ -101,11 +101,11 @@ const apiIntermediateRoute = new RegExpRoute(
// - trends/*
// - timelines/link
/^https?:\/\/[^\/]+\/api\/v\d+\/(trends|timelines\/link)/,
new CacheFirst({
new StaleWhileRevalidate({
cacheName: 'api-intermediate',
plugins: [
new ExpirationPlugin({
maxAgeSeconds: 10 * 60, // 10 minutes
maxAgeSeconds: 1 * 60, // 1min
}),
new CacheableResponsePlugin({
statuses: [0, 200],