Cache operations
Two endpoints control what bots receive from cache. Both take a list of URLs. They differ in what happens to the version already cached:
| Recache | Invalidate | |
|---|---|---|
| Existing cache | Stays live until the new render completes | Dropped immediately |
| Next bot request | Served the old version, then the new one | Triggers a fresh render and waits for it |
| Use it for | Routine content updates | A deleted page, corrected content, a changed status code |
Prefer recache whenever the old version can keep serving until the new render is ready. Reach for invalidate when the cached version must stop being served now.
Both endpoints need the manager role or above. Failure cases are listed in errors and rate limits.
Recache URLs
POST /api/websites/{website}/cache/recache
Queue URLs for rendering. Existing cache entries are not affected until the render completes, so bots keep receiving the current version until the new one is ready.
curl -X POST https://cloud.edgecomet.com/api/websites/123/cache/recache \
-H "Authorization: Bearer eck_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"urls": [
"https://example.com/article/1",
"https://example.com/article/2"
],
"priority": "normal"
}'Request body
| Field | Type | Notes |
|---|---|---|
urls | string[] | Required. HTTP/HTTPS URLs. Up to 100 for priority=high, 1000 for priority=normal. Duplicates are silently removed. |
priority | string | Optional. "high" or "normal". Default "normal". Use high for a just-published page that should re-render ahead of the queue. |
Response (200)
{
"entriesEnqueued": 4,
"urlsAccepted": 2
}urlsAccepted counts the URLs taken from the request. entriesEnqueued is the authoritative count of render jobs created - it can be greater than urlsAccepted when multiple cache dimensions apply to a URL (for example separate desktop and mobile cache entries).
Invalidate URLs
POST /api/websites/{website}/cache/invalidate
Drop cached entries for the given URLs. The next request from a bot triggers a fresh render.
curl -X POST https://cloud.edgecomet.com/api/websites/123/cache/invalidate \
-H "Authorization: Bearer eck_xxxxxxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{"urls":["https://example.com/deleted-page"]}'Request body
| Field | Type | Notes |
|---|---|---|
urls | string[] | Required. 1 to 1000 HTTP/HTTPS URLs. |
Response (200)
{
"entriesInvalidated": 2,
"urlsAccepted": 1
}urlsAccepted counts the URLs taken from the request. entriesInvalidated is the authoritative count of cache entries dropped - it can be greater than urlsAccepted when multiple cache dimensions apply to a URL.