mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 06:06:41 +01:00
This caching seems still buggy
Revert to SWR with 1-min expiry
This commit is contained in:
parent
cf2461add5
commit
4ebfb544aa
1 changed files with 2 additions and 2 deletions
|
@ -101,11 +101,11 @@ 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 CacheFirst({
|
new StaleWhileRevalidate({
|
||||||
cacheName: 'api-intermediate',
|
cacheName: 'api-intermediate',
|
||||||
plugins: [
|
plugins: [
|
||||||
new ExpirationPlugin({
|
new ExpirationPlugin({
|
||||||
maxAgeSeconds: 10 * 60, // 10 minutes
|
maxAgeSeconds: 1 * 60, // 1min
|
||||||
}),
|
}),
|
||||||
new CacheableResponsePlugin({
|
new CacheableResponsePlugin({
|
||||||
statuses: [0, 200],
|
statuses: [0, 200],
|
||||||
|
|
Loading…
Reference in a new issue