Skip to main content

Purge Oracle Cache

Drops everything cached for one price oracle, so a corrected source shows up now instead of after the cache window:

  • every cached summary of the oracle (all codes), which is shared by every server process;
  • the copy of the source document held by the server process that answered the request (only the SHEET provider keeps one).

The response says what was actually dropped: summary_entries: 0 with document_cleared: false means nothing was cached, not that the purge failed.

Required permission: oracle:update

Request​

DELETE /v2/admin/oracles/{oracle_id}/cache

Parameters​

NameTypeInDescription
oracle_idstringpathRequired. Oracle id (24-character hex)

Headers​

NameDescription
AuthorizationRequired. Bearer <access_token>

Example​

curl --request DELETE \
--url '{{baseUrl}}/v2/admin/oracles/677ed6e3cc111aea14a3dfc3/cache' \
--header 'Authorization: Bearer <access_token>'

Response​

{
"summary_entries": 2,
"document_cleared": false
}

Response Fields​

FieldTypeDescription
summary_entriesintegerNumber of cached summaries removed
document_clearedbooleanWhether the answering process held a copy of the source document and dropped it. Other server processes keep theirs until their own cache window ends

Errors​

StatusCodeDescription
40010000oracle_id is not a valid 24-character hex id
40010001Oracle not found or deleted (domain 5)
40010003The summary cache could not be cleared (domain 5)

See Errors for the error format and common codes.