51 lines
1.5 KiB
Markdown
51 lines
1.5 KiB
Markdown
# F-156 — Implementer evidence
|
|
|
|
## Problema
|
|
|
|
Las modificaciones de páginas CMS, por ejemplo `/about`, no se reflejaban en el frontend porque esas rutas se podían servir como contenido estático/cacheado y `fetchPage()` no desactivaba explícitamente la caché de Next `fetch`.
|
|
|
|
## Cambios
|
|
|
|
- `project/frontend/src/lib/api.ts`
|
|
- `fetchPage(slug)` ahora usa `{ cache: 'no-store' }`.
|
|
- `project/frontend/src/app/about/page.tsx`
|
|
- `export const dynamic = 'force-dynamic'`.
|
|
- `project/frontend/src/app/contact/page.tsx`
|
|
- `export const dynamic = 'force-dynamic'`.
|
|
- `project/frontend/src/app/shipping/page.tsx`
|
|
- `export const dynamic = 'force-dynamic'`.
|
|
|
|
## Verificación runtime
|
|
|
|
Prueba real sobre `/about`:
|
|
|
|
1. Se añadió temporalmente marcador `F156-CMS-1787344784` al body CMS en DB.
|
|
2. `curl http://192.168.18.93:3003/about` mostró el marcador sin rebuild.
|
|
3. Se restauró el body original.
|
|
4. `curl http://192.168.18.93:3003/about` dejó de mostrar el marcador.
|
|
|
|
Resultado:
|
|
|
|
```text
|
|
reflected:F156-CMS-1787344784 ✅
|
|
restored:F156-CMS-1787344784 ✅
|
|
```
|
|
|
|
Frontend reiniciado con build final y `/about` responde:
|
|
|
|
```text
|
|
Cache-Control: private, no-cache, no-store, max-age=0, must-revalidate
|
|
```
|
|
|
|
## Checks
|
|
|
|
```text
|
|
frontend npm run build ✅
|
|
frontend npx tsc --noEmit ✅
|
|
frontend eslint archivos tocados ✅
|
|
frontend prettier archivos tocados ✅
|
|
monolith prod status ✅ backend/admin/frontend/storefront 200
|
|
verify.sh ✅
|
|
git diff --check ✅
|
|
```
|