- Home
- How often do air-quality forecasts update?
Freshness and timestamps
How often do air-quality forecasts update?
There is no single universal “update every X minutes” answer. A model has a run cycle, the provider publishes and serves it, and an application may cache a response. The timestamp shown to users should identify the underlying forecast, not merely the page-load time.
Four clocks
Model run, valid hour, fetch time, and page view are different
A model run is the forecast production cycle. A valid hour is the future or current period represented by one forecast value. Fetch time is when AirAgora requested the provider. Page-view time is when the user opened the result. Treating those four clocks as one creates false freshness.
AirAgora stores source and fetch timestamps separately and formats valid hours in the location timezone. A browser refresh does not rewrite an old source timestamp as new data.
Provider cadence belongs to the provider
OpenWeather exposes current air-pollution conditions and four days of hourly forecast through its API. The exact availability of a new forecast update belongs to the provider, so AirAgora does not promise a made-up minute.
The live result reports the timestamp actually received. Source documentation, not marketing copy, controls freshness claims.
Why AirAgora caches public requests
Caching reduces latency, provider load, and duplicated requests. Air-quality responses have a bounded fresh period, while concurrent requests for the same normalized location can be coalesced. The cache key removes credentials and uses only normalized request facts.
Geocoding and forecast data use different freshness windows because their change patterns differ. Static 2,500-city lookup stays off D1 and the provider hot path entirely.
Stale-on-error is not silent freshness
If a live refresh fails, a recent cached forecast can be more useful than a blank screen, but only when its age is bounded and disclosed. AirAgora can retain air-quality data for a limited stale window after an error. It keeps the original provider time and labels the state.
Once the stale retention expires, or if no valid entry exists, the product shows unavailable. It never fills missing hours or replaces the provider with fixtures in production.
How to compare update times across apps
Look for the source forecast time, not a generic “updated just now” attached to page rendering. Align timezone and determine whether the timestamp belongs to a model run, valid hour, station observation, or cache fetch.
A service with a newer page timestamp may still display an older model. Conversely, a model run issued earlier can contain valid future hours. The most transparent product names the data type and preserves the relevant clock.
- Source time: when the provider data was issued or marked.
- Valid time: the hour represented by the forecast value.
- Fetch time: when the application requested the provider.
- Cache age: how long that response has been reused.
- View time: when the browser rendered the page.
Alerts use idempotency as well as freshness
A scheduled alert run does not send every time it sees the same forecast. Rule state records crossings, recovery, cooldown, and local morning date. Delivery keys prevent repeated sends for the same trigger.
Provider failure is counted and visible to the cron circuit breaker. After three consecutive failures, the batch stops rather than producing fake messages. This operational behavior is part of update trust: freshness without delivery control would create noise.
Direct answers
Frequently asked questions
Does AirAgora fetch the provider on every page view?
No. It uses bounded caching and request coalescing to reduce duplicate provider calls while preserving source timestamps.
What does “forecast time” mean?
It is a provider/source timestamp associated with the modeled data. It is distinct from the browser view time and the local valid hour.
How long is air-quality data fresh in AirAgora?
The AirAgora cache treats it as fresh for 20 minutes. A bounded two-hour stale retention may be used after an error with explicit labeling.
Does refreshing the page make the data newer?
Not necessarily. A refresh can reuse the same valid cache or provider model run. The visible source timestamp is the evidence.
What happens when the provider is unavailable?
A recent bounded stale entry may be labeled and shown. Otherwise AirAgora returns unavailable and never substitutes a fixture, scrape, or alternate provider.
Can alerts repeat on every cron run?
They should not. Idempotency keys, crossing state, recovery, cooldown, and local-date checks prevent duplicate morning and threshold messages.
Evidence register
Sources and further reading
The links below identify the primary references used on this page. Selection, summary, and presentation are AirAgora modifications.
Keep exploring
AirAgora provides informational planning guidance, not medical advice. Local conditions can differ from modeled forecasts; follow official guidance during severe events.