Skip to content

Clear the edge cache

Every deploy and every rollback already clears your production addresses from the edge cache, twice: at once, and again about 90 seconds later. You rarely need to do it yourself.

Clear it by hand when a page still shows old content after a deploy has finished. A cache clear changes no files and no settings. The only cost is that the first visit from each edge location afterwards is a little slower, while that location fetches the page again.

Open the project. The Cache row in the overview says when the cache was last cleared. Select Clear now, check the addresses it lists, then select Clear N addresses.

The row shows Clearing while the request runs and Cleared once every edge location has dropped its copy, usually within a minute.

Terminal window
curl -X POST "https://api.deploybase.eu/api/v1/projects/$PROJECT_ID/cache/purge" \
-H "Authorization: Bearer $DEPLOYBASE_API_KEY"

The response is 202 Accepted and lists the addresses being cleared:

{
"data": {
"id": "01234567-89ab-cdef-0123-456789abcdef",
"hosts": ["docs.example.com", "docs.sites.deploybase.eu"],
"requested_at": "2026-11-01T14:02:11Z",
"status": "queued"
}
}

To see whether it finished, GET the same path. status moves from queued to done, or failed if an edge location could not be reached; clearing again retries it. retry_after_seconds is how long until you can clear again, 0 when you can now.

The MCP server has a clear_project_cache tool that takes a project_id. Ask your assistant to “clear the cache of my docs project”.

  • Your sites.deploybase.eu address and every verified custom domain on the project, including the www address that comes with a root domain on managed DNS.
  • Every file on those addresses, not only pages.
  • Not branch previews: each preview deploy already clears its own address.
  • Who: members, admins and owners of the team. Viewers can see the Cache row but not clear it.
  • How often: 5 clears per project in each 10-minute window. A sixth returns 429 with CACHE_PURGE_RATE_LIMITED and a Retry-After header.
  • Live projects only: a project with nothing in production returns 409 with PROJECT_NOT_LIVE.

The edge cache is the only cache this reaches. A browser that already holds a file keeps it until it expires. Pages are checked with the server on every visit, so they are never the problem. A content-hashed file such as _astro/index.4f2a9c.js can be kept for a year, but a new build gives it a new name, so the new page never asks for the old file.

If a page still looks old after a clear, open it in a private window. If it is new there, the old copy is in your own browser.

Live 022265e7 built