Projects
List cache rules
Returns the cache rules for a database, showing all observed query shapes with their stats and cache recommendations.
AuthorizationBearer <token>
JWT issued by Better Auth. Verified via JWKS.
In: header
Path Parameters
project_id*string
Unique project identifier (prefixed, e.g. prj_xxx).
database_id*string
Unique database identifier (prefixed, e.g. db_xxx).
Query Parameters
page_size?integer
Maximum number of items to return (1-100, default 20).
page_token?string
Opaque token for cursor-based pagination.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/v1/projects/string/databases/string/cache-rules"{ "entries": [ { "query_hash": "a1b2c3d4e5f60718", "normalized_sql": "SELECT * FROM users WHERE id = $1", "query_type": "read", "cache_enabled": true, "cache_ttl_seconds": 300, "cache_swr_seconds": 60, "call_count": 0, "avg_latency_ms": 0.1, "p95_latency_ms": 0.1, "avg_response_bytes": 0, "stability_rate": 0.1, "recommendation": "great", "first_seen_at": "2019-08-24T14:15:22Z", "last_seen_at": "2019-08-24T14:15:22Z" } ], "next_page_token": "string"}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}{ "error": { "code": "string", "message": "string" }}