Cache more stuff
This commit is contained in:
parent
3037a5d2a1
commit
b7c1078c26
|
@ -33,9 +33,13 @@ const imageRoute = new Route(
|
||||||
);
|
);
|
||||||
registerRoute(imageRoute);
|
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(
|
const apiExtendedRoute = new RegExpRoute(
|
||||||
/^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis)/,
|
/^https?:\/\/[^\/]+\/api\/v\d+\/(instance|custom_emojis|preferences|lists\/\d+)/,
|
||||||
new StaleWhileRevalidate({
|
new StaleWhileRevalidate({
|
||||||
cacheName: 'api-extended',
|
cacheName: 'api-extended',
|
||||||
plugins: [
|
plugins: [
|
||||||
|
|
Loading…
Reference in a new issue