chore: increase follower count cache revalidation interval to 24 hours

This commit is contained in:
2026-06-20 20:53:57 +07:00 Unverified
parent a740631d89
commit fe626de80f
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ export const config = {
{ {
name: "Discord server", name: "Discord server",
link: "https://discord.com/invite/3cZQbvW6cF", link: "https://discord.com/invite/3cZQbvW6cF",
desc: "เข้าเซิฟเวอร์ในดิส", desc: "เข้าเซิร์ฟเวอร์ในดิส",
icon: "/discord.webp", icon: "/discord.webp",
}, },
{ {
+1 -1
View File
@@ -8,7 +8,7 @@ export async function getDiscordMemberCount(): Promise<number | null> {
`https://discord.com/api/v10/guilds/${encodeURIComponent(guildId)}?with_counts=true`, `https://discord.com/api/v10/guilds/${encodeURIComponent(guildId)}?with_counts=true`,
{ {
headers: { Authorization: `Bot ${token}` }, headers: { Authorization: `Bot ${token}` },
next: { revalidate: 300 }, next: { revalidate: 86400 },
} }
); );
if (!res.ok) return null; if (!res.ok) return null;
+1 -1
View File
@@ -5,7 +5,7 @@ export async function getRobloxFollowerCount(): Promise<number | null> {
try { try {
const res = await fetch( const res = await fetch(
`https://friends.roblox.com/v1/users/${encodeURIComponent(userId)}/followers/count`, `https://friends.roblox.com/v1/users/${encodeURIComponent(userId)}/followers/count`,
{ next: { revalidate: 300 } } { next: { revalidate: 86400 } }
); );
if (!res.ok) return null; if (!res.ok) return null;
+1 -1
View File
@@ -6,7 +6,7 @@ export async function getYoutubeSubscriberCount(): Promise<number | null> {
try { try {
const res = await fetch( const res = await fetch(
`https://www.googleapis.com/youtube/v3/channels?part=statistics&id=${encodeURIComponent(channelId)}&key=${encodeURIComponent(apiKey)}`, `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; if (!res.ok) return null;