From fe626de80fccca2b271cee2dcb4b134428813e5d Mon Sep 17 00:00:00 2001 From: gunshiz Date: Sat, 20 Jun 2026 20:53:57 +0700 Subject: [PATCH] chore: increase follower count cache revalidation interval to 24 hours --- lib/config.ts | 2 +- lib/followers/discord.ts | 2 +- lib/followers/roblox.ts | 2 +- lib/followers/youtube.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/config.ts b/lib/config.ts index 5ba6428..ea422b5 100644 --- a/lib/config.ts +++ b/lib/config.ts @@ -29,7 +29,7 @@ export const config = { { name: "Discord server", link: "https://discord.com/invite/3cZQbvW6cF", - desc: "เข้าเซิฟเวอร์ในดิส", + desc: "เข้าเซิร์ฟเวอร์ในดิส", icon: "/discord.webp", }, { diff --git a/lib/followers/discord.ts b/lib/followers/discord.ts index 9423fa0..1ed1beb 100644 --- a/lib/followers/discord.ts +++ b/lib/followers/discord.ts @@ -8,7 +8,7 @@ export async function getDiscordMemberCount(): Promise { `https://discord.com/api/v10/guilds/${encodeURIComponent(guildId)}?with_counts=true`, { headers: { Authorization: `Bot ${token}` }, - next: { revalidate: 300 }, + next: { revalidate: 86400 }, } ); if (!res.ok) return null; diff --git a/lib/followers/roblox.ts b/lib/followers/roblox.ts index 0622bec..e98ddab 100644 --- a/lib/followers/roblox.ts +++ b/lib/followers/roblox.ts @@ -5,7 +5,7 @@ export async function getRobloxFollowerCount(): Promise { try { const res = await fetch( `https://friends.roblox.com/v1/users/${encodeURIComponent(userId)}/followers/count`, - { next: { revalidate: 300 } } + { next: { revalidate: 86400 } } ); if (!res.ok) return null; diff --git a/lib/followers/youtube.ts b/lib/followers/youtube.ts index 8ecf837..d239895 100644 --- a/lib/followers/youtube.ts +++ b/lib/followers/youtube.ts @@ -6,7 +6,7 @@ export async function getYoutubeSubscriberCount(): Promise { try { const res = await fetch( `https://www.googleapis.com/youtube/v3/channels?part=statistics&id=${encodeURIComponent(channelId)}&key=${encodeURIComponent(apiKey)}`, - { next: { revalidate: 300 } } + { next: { revalidate: 86400 } } ); if (!res.ok) return null;