Skip to content
Docs · Web

CDN

How long the edge keeps a static site's pages and files, and browsers its files.

View as Markdown
All topics
On this page

One setting for every static site in the workspace, built into each site when it deploys, so a change takes effect on each site's next deploy, or at once when you press Apply now on Dashboard → Shield (or POST /api/services/cdn), which puts the saved CDN and Shield settings on every live static site. Blocking countries is in Shield.

Settings

SettingMeaning
cacheTtlSecondsHow long the edge keeps each page and file, and browsers keep files such as images, scripts and styles (default 3,600 seconds). Browsers check HTML pages again on every visit, so a page never goes stale in someone's browser.
enabledTurning the CDN off stops caching: every visit is served fresh.

The edge keeps a copy per deployment, so a redeploy shows at once: nothing has to be cleared. Server apps, worker.js programs and functions are not affected by this setting yet. Changing it needs an owner or admin.

Where to change them

  • Dashboard → CDN, or PUT /api/services/cdn (the body is merged over the saved settings), or an owner's or admin's AI assistant with get_service_config and update_service_config.

Reference

REST
GET /api/services/cdn · PUT /api/services/cdn  { "enabled": true, "cacheTtlSeconds": 3600 }