# Get private cache stats (/docs/api/cache/cache_stats)

Records (entities and exact responses), bytes, hits and the vendor spend cache hits saved this month and all time, plus daily hit/partial/miss counts. Cache hits are always free.

`GET /v1/cache/stats`

```json
{
  "operationId": "cache_stats",
  "summary": "Get private cache stats",
  "description": "Records (entities and exact responses), bytes, hits and the vendor spend cache hits saved this month and all time, plus daily hit/partial/miss counts. Cache hits are always free.",
  "tags": [
    "cache"
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "responses": {
    "200": {
      "description": "OK",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "enum": [
                  "cache_stats"
                ]
              },
              "records": {
                "type": "integer",
                "minimum": 0
              },
              "entities": {
                "type": "integer",
                "minimum": 0
              },
              "responses": {
                "type": "integer",
                "minimum": 0
              },
              "limit": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "bytes": {
                "type": "integer",
                "minimum": 0
              },
              "hits": {
                "type": "integer",
                "minimum": 0
              },
              "saved_micro_month": {
                "type": "integer",
                "minimum": 0
              },
              "saved_micro_total": {
                "type": "integer",
                "minimum": 0
              },
              "month": {
                "type": "string",
                "pattern": "^\\d{4}-\\d{2}$"
              },
              "by_capability": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "capability": {
                      "type": "string"
                    },
                    "records": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "hits": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "saved_micro": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "capability",
                    "records",
                    "hits",
                    "saved_micro"
                  ]
                }
              },
              "daily": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string",
                      "format": "date"
                    },
                    "hit": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "partial": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "stale": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "miss": {
                      "type": "integer",
                      "minimum": 0
                    },
                    "saved_micro": {
                      "type": "integer",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "day",
                    "hit",
                    "partial",
                    "stale",
                    "miss",
                    "saved_micro"
                  ]
                }
              }
            },
            "required": [
              "object",
              "records",
              "entities",
              "responses",
              "limit",
              "bytes",
              "hits",
              "saved_micro_month",
              "saved_micro_total",
              "month",
              "by_capability",
              "daily"
            ]
          }
        }
      }
    },
    "default": {
      "description": "Error",
      "content": {
        "application/json": {
          "schema": {
            "type": "object",
            "properties": {
              "error": {
                "type": "object",
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "invalid_request",
                      "unauthorized",
                      "insufficient_balance",
                      "max_cost_exceeded",
                      "scope_denied",
                      "budget_blocked",
                      "not_found",
                      "idempotency_mismatch",
                      "invalid_meta",
                      "rate_limited",
                      "upstream_error",
                      "response_buffer_limit",
                      "provider_capacity_unavailable",
                      "grid_saturated",
                      "upstream_timeout",
                      "conflict",
                      "internal_error",
                      "account_frozen",
                      "strict_filters",
                      "plan_limit_reached",
                      "validation_failed",
                      "deadline_exceeded",
                      "cancelled"
                    ]
                  },
                  "message": {
                    "type": "string"
                  },
                  "request_id": {
                    "type": "string"
                  },
                  "call_id": {
                    "type": "string"
                  },
                  "retry_after_ms": {
                    "type": "integer",
                    "minimum": 0
                  },
                  "details": {
                    "type": "object",
                    "additionalProperties": {}
                  }
                },
                "required": [
                  "code",
                  "message"
                ]
              }
            },
            "required": [
              "error"
            ]
          }
        }
      }
    }
  }
}
```
