From a4867165205f6be7d6939d7ce60aa355c4c28ab8 Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 07:49:39 +0000 Subject: [PATCH 1/2] =?UTF-8?q?perf:=20renderBase=E3=81=A7Cache-Control?= =?UTF-8?q?=E3=82=9215=E7=A7=92=E3=81=8B=E3=82=89300=E7=A7=92=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 7 +++++++ packages/backend/src/server/web/ClientServerService.ts | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 77df0d292e..a02788b7ac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,13 @@ You should also include the user name that made the change. --> +## 13.x.x (unreleased) + +### Improvements +- Server: UIのHTML(ノートなどの特別なページを除く)のキャッシュ時間を15秒から300秒に + +### Bugfixes +- ## 13.5.3 (2023/02/09) diff --git a/packages/backend/src/server/web/ClientServerService.ts b/packages/backend/src/server/web/ClientServerService.ts index 1fa8950d75..46470246ef 100644 --- a/packages/backend/src/server/web/ClientServerService.ts +++ b/packages/backend/src/server/web/ClientServerService.ts @@ -337,7 +337,7 @@ export class ClientServerService { const renderBase = async (reply: FastifyReply) => { const meta = await this.metaService.fetch(); - reply.header('Cache-Control', 'public, max-age=15'); + reply.header('Cache-Control', 'public, max-age=300'); return await reply.view('base', { img: meta.bannerUrl, title: meta.name ?? 'Misskey', From deed25a2ffdcb33d9a43bb1a3677ceca0603b23c Mon Sep 17 00:00:00 2001 From: tamaina Date: Thu, 9 Feb 2023 08:00:45 +0000 Subject: [PATCH 2/2] Fix #9842 --- packages/backend/src/server/web/views/base.pug | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/web/views/base.pug b/packages/backend/src/server/web/views/base.pug index d05901baec..8d6897c46d 100644 --- a/packages/backend/src/server/web/views/base.pug +++ b/packages/backend/src/server/web/views/base.pug @@ -35,7 +35,8 @@ html link(rel='prefetch' href='https://xn--931a.moe/assets/info.jpg') link(rel='prefetch' href='https://xn--931a.moe/assets/not-found.jpg') link(rel='prefetch' href='https://xn--931a.moe/assets/error.jpg') - link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css') + //- https://github.com/misskey-dev/misskey/issues/9842 + link(rel='stylesheet' href='/assets/tabler-icons/tabler-icons.min.css?v2.2.0') link(rel='modulepreload' href=`/vite/${clientEntry.file}`) if !config.clientManifestExists