We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 597a8eb commit a082b80Copy full SHA for a082b80
netlify/edge-functions/visitors.ts
@@ -2,7 +2,7 @@ import { getStore } from "@netlify/blobs";
2
import type { Config, Context } from "@netlify/edge-functions";
3
4
const VISITORS_KEY = "visitor_counts";
5
-const CACHE_TTL = 15;
+const CACHE_TTL = 30;
6
const MAX_HISTORY_POINTS = 8;
7
const SITE_ID = "EPXKTQED";
8
@@ -255,8 +255,8 @@ async function handleSSE(request: Request): Promise<Response> {
255
// Send initial data
256
await sendStats();
257
258
- // Update every 15 seconds
259
- const timer = setInterval(sendStats, 15000);
+ // Update every 30 seconds
+ const timer = setInterval(sendStats, 30000);
260
261
request.signal.addEventListener("abort", () => {
262
clearInterval(timer);
0 commit comments