Frontend Cache
Static assets are smartly cached on FastAPI Cloud, powered by Cloudflare. ⚡️
Most are served directly by the high-performance CDN, without reaching your Python app.
Automatic Cache Purging
Section titled “Automatic Cache Purging”The cache resets automatically on every deployment. After the new deployment is ready, the next request for an asset fetches the current version from your app and stores it in the CDN cache again.
The purge applies to your app’s default FastAPI Cloud hostname and all of its custom domains.
You normally don’t need to purge the cache yourself after deploying.
Purge the Cache Manually
Section titled “Purge the Cache Manually”If a cached frontend asset is stale, you can request a purge from the dashboard:
- Navigate to your app in the dashboard.
- Select Settings from the sidebar.
- Find the Caching section and click Purge Cache.
- Confirm by clicking Purge Cache again in the modal.
The purge removes the cached assets for all of your app’s hostnames. Requests made immediately afterward are served by your app until the CDN has cached the assets again, so your app may briefly receive more traffic.
To learn how to build and serve static frontend files from your app, see Deploy a Full-Stack App.