Weather in San Francisco

Current Conditions

Temperature: 50.2°F

Wind Speed: 14.8 km/h

Data fetched by Scheduled Function at: (UTC)

Page generated (Cache Purged) at: (UTC)

How it works

This page demonstrates how to use Netlify Scheduled Functions combined with Cache Tags and Netlify Blobs to create a daily updated static page.

  1. A Scheduled Function runs daily.
  2. It fetches the latest weather data from an external API and saves it to Netlify Blobs.
  3. It then purges the cache tag weather-sf using the Cache API.
  4. The next time you visit this page, Netlify sees the cache is invalid (purged) and regenerates the page using the latest data from the Blob store.
  5. The page is then cached again with Netlify-CDN-Cache-Control and the weather-sf tag, waiting for the next daily purge.