Files
mercadodevida/work/artifacts/F-027/documenter.md
2026-08-17 22:23:10 +02:00

24 lines
963 B
Markdown

# Documenter — F-027 Caching layer with explicit contracts
## Summary
Cache module exposes a read-through wrapper, registered contracts and metrics. PostgreSQL remains the source of truth; the cache is best-effort and degrades to the loader when the adapter is unavailable.
## Public API notes
| Route | Access | Result |
|---|---|---|
| GET /cache/contracts | admin | Returns registered contracts (key, TTL, source, invalidation) |
| GET /cache/metrics | authenticated | Returns hits/misses/invalidations/hitRatio |
## Contracts (v1)
- `product:{slug}` 300s invalidated by ProductUpdated
- `category:{slug}` 300s invalidated by CategoryUpdated
- `nav:tree` 600s invalidated by NavigationInvalidated
- `search:popular` 60s invalidated by SearchInvalidated
## Evidence
- `work/artifacts/F-027/architect.md`
- `work/artifacts/F-027/implementer.md`
- `work/artifacts/F-027/reviewer.json`
- `work/artifacts/F-027/security.json`
- `work/artifacts/F-027/qa.json`