diff --git a/static/docs.html b/static/docs.html index d009d3c..f791a8d 100644 --- a/static/docs.html +++ b/static/docs.html @@ -56,6 +56,7 @@ Autenticação Convenções Anatomia da resposta + Cache
Endpoints
Consultas Andamentos & processo @@ -212,6 +213,27 @@

Anatomia da respo + +
+

Cache

+

As respostas JSON de /v1/* são cacheadas em memória (read-only), com single-flight e serve-stale quando o SEI cai. Cada resposta traz headers para o cliente decidir.

+
+
+
X-Cache
+

HIT · MISS · STALE · PARTIAL. STALE = SEI fora do ar, servindo o último valor bom.

+
+
+
Cache-Control · Age
+

private, max-age=<ttl> + Age coerentes com o TTL (listas ~6h; processo ~30s).

+
+
+
Forçar fresco
+

Envie Cache-Control: no-cache (revalida) ou no-store (busca fresco sem persistir).

+
+
+

Faults de SOAP de "não encontrado" são lembrados por pouco tempo (negative caching). O endpoint SSE /v1/andamentos/stream é exceção: não carrega esses headers (é um fluxo de eventos), mas respeita no-cache/no-store. Estatísticas em /health.

+
+