Gate analytics and cache public API requests

This commit is contained in:
2569718930@qq.com
2026-04-06 13:58:11 +08:00
parent 9be12ad1d7
commit 08d7308486
14 changed files with 114 additions and 309 deletions
+3
View File
@@ -88,6 +88,8 @@ function getMarketScanCacheKey(cityName: string, targetDate?: string | null) {
const SELECTED_CITY_STORAGE_KEY = "polyWeather_selected_city_v1";
const BACKGROUND_SUMMARY_REFRESH_MS = 30_000;
const EAGER_CITY_SUMMARIES_ENABLED =
process.env.NEXT_PUBLIC_POLYWEATHER_EAGER_CITY_SUMMARIES === "true";
export function DashboardStoreProvider({
children,
@@ -392,6 +394,7 @@ export function DashboardStoreProvider({
]);
useEffect(() => {
if (!EAGER_CITY_SUMMARIES_ENABLED) return;
if (!cities.length) return;
const queue = cities