Improve video data refresh rate for better performance

Adjust the refetchInterval for view counts from 30 seconds to 2 minutes in VideoPage and Home components to optimize data fetching and reduce potential load.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: 2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8cc42625-c1f5-4e43-99bd-77f2c4dedee2/2cd2c0bc-434c-4bc9-ad3f-b99d3897a0d1/gjpMN2A
This commit is contained in:
sebastjanartic 2025-09-03 14:44:42 +00:00
parent 498ecc3c96
commit ccb36e484e
2 changed files with 4 additions and 4 deletions

View File

@ -75,8 +75,8 @@ export default function VideoPage() {
enabled: !!videoId,
retry: 3,
retryDelay: 1000,
// Real-time refresh for view counts - refresh every 30 seconds
refetchInterval: 30000,
// Real-time refresh for view counts - refresh every 2 minutes for better performance
refetchInterval: 120000,
refetchOnWindowFocus: true,
refetchOnReconnect: true,
});

View File

@ -44,8 +44,8 @@ export default function Home() {
gcTime: 10 * 60 * 1000,
refetchOnWindowFocus: true,
refetchOnReconnect: true,
// Real-time refresh for view counts - refresh every 30 seconds
refetchInterval: 30000
// Real-time refresh for view counts - refresh every 2 minutes for better performance
refetchInterval: 120000
});
// Update videos when new data comes in