From 0cffe60abc9a9e14f5815af472c100e630166c29 Mon Sep 17 00:00:00 2001 From: tamaina Date: Sun, 22 Jan 2023 17:14:05 +0000 Subject: [PATCH] =?UTF-8?q?1=E6=99=82=E9=96=93=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/server/api/endpoints/emojis.ts | 4 ++-- packages/frontend/src/custom-emojis.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/emojis.ts b/packages/backend/src/server/api/endpoints/emojis.ts index 9dfb12b76..77854afb3 100644 --- a/packages/backend/src/server/api/endpoints/emojis.ts +++ b/packages/backend/src/server/api/endpoints/emojis.ts @@ -11,7 +11,7 @@ export const meta = { requireCredential: false, allowGet: true, - cacheSec: 60, + cacheSec: 3600, res: { type: 'object', @@ -77,7 +77,7 @@ export default class extends Endpoint { }, cache: { id: 'meta_emojis', - milliseconds: 60000, // 1 minute + milliseconds: 3600000, // 1 hour }, }); diff --git a/packages/frontend/src/custom-emojis.ts b/packages/frontend/src/custom-emojis.ts index 33f006b2a..89b8887b2 100644 --- a/packages/frontend/src/custom-emojis.ts +++ b/packages/frontend/src/custom-emojis.ts @@ -33,7 +33,7 @@ stream.on('emojiDeleted', emojiData => { export async function fetchCustomEmojis() { const now = Date.now(); const lastFetchedAt = miLocalStorage.getItem('lastEmojisFetchedAt'); - if (lastFetchedAt && (now - parseInt(lastFetchedAt)) < 1000 * 60) return; + if (lastFetchedAt && (now - parseInt(lastFetchedAt)) < 1000 * 60 * 60) return; const res = await apiGet('emojis', {});