> ## Documentation Index
> Fetch the complete documentation index at: https://trailblazer.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# GET /cache/stats — View cached Places statistics

> Retrieve statistics on Google Places queries in the server-side cache, including query terms, locations, restaurant result counts, and cache timestamps.

The `/cache/stats` endpoint returns a snapshot of every Google Places search query that the API has cached server-side. Each entry shows the original query string, the location it was run against, how many restaurant results were stored, and when it was cached. Use this endpoint to understand which searches have already been warmed up and to avoid redundant lookups in your integration.

## Request

```text theme={null}
GET https://naijataste-api-vcp4.onrender.com/cache/stats
```

This endpoint takes no parameters.

## Response

<ResponseField name="total_cached_queries" type="number" required>
  The total number of distinct queries currently in the cache.
</ResponseField>

<ResponseField name="queries" type="object[]" required>
  An array of cached query objects, one per stored search.

  <Expandable title="query object properties">
    <ResponseField name="query" type="string" required>
      The original search string used to fetch results from Google Places (e.g. `"suya Lagos"`).
    </ResponseField>

    <ResponseField name="location" type="string" required>
      The location string that was passed with the query (e.g. `"Lagos"`).
    </ResponseField>

    <ResponseField name="restaurants" type="number" required>
      The number of restaurant results stored for this query.
    </ResponseField>

    <ResponseField name="cached_at" type="string" required>
      An ISO 8601 timestamp indicating when this query was cached (e.g. `"2024-01-15T10:30:00"`).
    </ResponseField>
  </Expandable>
</ResponseField>

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl "https://naijataste-api-vcp4.onrender.com/cache/stats"
  ```

  ```json Response theme={null}
  {
    "total_cached_queries": 42,
    "queries": [
      {
        "query": "suya Lagos",
        "location": "Lagos",
        "restaurants": 10,
        "cached_at": "2024-01-15T10:30:00"
      }
    ]
  }
  ```
</CodeGroup>
