AQL query results cache HTTP API
Control the caching of AQL query results with the HTTP interface
See The AQL query results cache for a description of the feature and the configuration options.
List the entries of the AQL query results cache
200 OK
The query results cache entries are returned successfully.
array of objects
A list of query results cache entries.
Each entry describes a cached query result but doesn’t include the cached result data itself.
bindVars object, optional
The bind parameters. This attribute is omitted if the
--query.tracking-with-bindvarsstartup option is set tofalse.
Response Body application/json
Retrieve the entries stored in the AQL query results cache of the current database:
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/query-cache/entries'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 433
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
[
{
"hash" : "17341318864108046370",
"query" : "RETURN 42",
"bindVars" : {
},
"size" : 15,
"results" : 1,
"hits" : 0,
"runTime" : 0.00010986699999193661,
"started" : "2026-09-24T16:35:40Z",
"dataSources" : [ ]
},
{
"hash" : "3942495485286482732",
"query" : "FOR doc IN @@coll FILTER doc.attr == @val RETURN doc",
"bindVars" : {
"@coll" : "coll",
"val" : "foo"
},
"size" : 75,
"results" : 0,
"hits" : 2,
"runTime" : 0.00040549999999939246,
"started" : "2026-09-24T16:35:40Z",
"dataSources" : [
"coll"
]
}
]Clear the AQL query results cache
Clear the AQL query results cache of the current database:
curl -X DELETE --header 'accept: application/json' --dump - 'http://localhost:8529/_api/query-cache'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 26
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"error" : false,
"code" : 200
}Get the AQL query results cache configuration
Retrieve the global configuration of the AQL query results cache:
curl --header 'accept: application/json' --dump - 'http://localhost:8529/_api/query-cache/properties'Show output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 107
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"mode" : "demand",
"maxResults" : 128,
"maxResultsSize" : 268435456,
"maxEntrySize" : 16777216,
"includeSystem" : false
}Set the AQL query results cache configuration
Adjusts the global properties for the AQL query results cache.
Changing the properties may invalidate all results currently in the cache.
- The result cache configuration settings to change.
includeSystem boolean
Whether to store results of queries that involve system collections in the cache.
Default: Controlled by the
--query.cache-include-system-collectionsstartup option.maxEntrySize integer
The maximum individual size of query results that are stored per database-specific cache (in bytes).
Default: Controlled by the
--query.cache-entry-max-sizestartup option.maxResults integer
The maximum number of query results that are stored per database-specific cache.
Default: Controlled by the
--query.cache-entriesstartup option.maxResultsSize integer
The maximum cumulated size of query results that are stored per database-specific cache (in bytes).
Default: Controlled by the
--query.cache-entries-max-sizestartup option.mode string
Possible values:
"off","on","demand"The mode the AQL query cache shall operate in.
Default: Controlled by the
--query.cache-modestartup option.
Change some properties of the global configuration of the AQL query results cache:
curl -X PUT --header 'accept: application/json' --data-binary @- --dump - 'http://localhost:8529/_api/query-cache/properties' <<'EOF'
{
"mode": "demand",
"maxResults": 32
}
EOFShow output
HTTP/1.1 200 OK
content-type: application/json
cache-control: no-cache, no-store, must-revalidate, pre-check=0, post-check=0, max-age=0, s-maxage=0
connection: Keep-Alive
content-length: 106
content-security-policy: frame-ancestors 'self'; form-action 'self';
expires: 0
pragma: no-cache
server: ArangoDB
strict-transport-security: max-age=31536000 ; includeSubDomains
x-arango-queue-time-seconds: 0.000000
x-content-type-options: nosniff
{
"mode" : "demand",
"maxResults" : 32,
"maxResultsSize" : 268435456,
"maxEntrySize" : 16777216,
"includeSystem" : false
}