refactor: update caching duration for network analysis and enhance layout structure in statistics view for improved readability

This commit is contained in:
2025-12-17 20:04:51 -05:00
parent a7cb561053
commit d1912871d3
3 changed files with 129 additions and 100 deletions

View File

@@ -419,7 +419,10 @@ class Statistics extends Component
$this->topPortsCurrentPage = 1;
// Persist the computed analysis for a short period to speed up subsequent loads
Cache::put($cacheKey, $analysis, now()->addSeconds(30));
// Cache duration is set to 25 seconds (slightly less than the 30s poll interval)
// This ensures fresh data is fetched on each poll cycle while still preventing
// duplicate requests within the same cycle
Cache::put($cacheKey, $analysis, now()->addSeconds(25));
// Reset retry count on successful load
$this->networkAnalysisRetryCount = 0;