---
title: "Obtener estadísticas de cache (DEBUG)"
method: GET
path: "/analytics/schema/cache/stats"
tags: ["Schema Discovery"]
---

# Obtener estadísticas de cache (DEBUG)

`GET /analytics/schema/cache/stats`

## Request

- Base URL: `http://localhost:8081`
- URL: `http://localhost:8081/analytics/schema/cache/stats`
- Auth: HTTP bearer

**Requiere autenticación y rol ADMIN/SUPERADMIN**.

Endpoint de debugging para ver estadísticas del cache de schemas.

**Retorna**:
- Número de entradas en cache
- Memoria total utilizada

## Response `200`

Estadísticas del cache

- object
  - `success` boolean
  - `cache_stats` object
    - `entries` integer
    - `total_memory_bytes` integer
    - `total_memory_kb` number

## Other responses

- `401`: No autorizado - Token JWT inválido o faltante. Los rechazos del middleware de autenticación usan el envelope `AuthError` (`{ success, message, code? }`); un `activeTenantId` mal formado devuelve `code: INVALID_ACTIVE_TENANT` (ver `components.responses.InvalidActiveTenant`), un token de tipo no admitido `code: INVALID_TOKEN_TYPE` con `message: Tipo de token no aceptado`, y un token de impersonación cuya sesión terminó `code: IMPERSONATION_SESSION_TERMINATED`.
- `403`: Acceso denegado
- `500`: Error interno del servidor

---

[API](https://skmtc.dev/nevent/apis/nevent-data-api.md) · [All operations](https://skmtc.dev/nevent/apis/nevent-data-api/llms.txt) · [OpenAPI document](https://skmtc.dev/nevent/apis/nevent-data-api/revisions/81035d32c1c1?raw)
