feat: add Redis-backed SSE updates
This commit is contained in:
@@ -57,13 +57,14 @@ export async function refetchPlatform(
|
||||
? JSON.parse(cached)
|
||||
: {};
|
||||
counts[platform] = count;
|
||||
await redis.set("erika:follower_counts", JSON.stringify(counts), { ex: 3600 });
|
||||
await redis.set("erika:follower_counts", JSON.stringify(counts), "EX", 3600);
|
||||
|
||||
if (tiktokProfile) {
|
||||
await redis.set(
|
||||
"erika:tiktok_profile",
|
||||
JSON.stringify(tiktokProfile),
|
||||
{ ex: 3600 }
|
||||
"EX",
|
||||
3600,
|
||||
);
|
||||
}
|
||||
} catch {
|
||||
|
||||
Reference in New Issue
Block a user