Commit Graph

2 Commits

Author SHA1 Message Date
AI Assistant c82e234d6c perf(tile-cache): fix compression passthrough + 7d TTL + browser caching
- Remove Accept-Encoding stripping — Martin gzip passes through to client
  (was sending uncompressed tiles, wasting bandwidth and cache space)
- Increase cache TTL from 1h to 7d (tiles change only on weekly sync)
- Increase inactive eviction from 24h to 7d
- Add Cache-Control header for browser caching (24h + stale-while-revalidate 7d)
- 204 (empty tiles) cached 1h instead of 1m (they don't change either)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 22:47:39 +02:00
AI Assistant 536b3659bb feat(geoportal): nginx tile cache + PMTiles overview layers + tippecanoe pipeline
- Add nginx reverse proxy cache in front of Martin (2GB, 1h TTL, stale serving, CORS)
- Martin no longer exposes host port — all traffic routed through tile-cache on :3010
- Add PMTiles support in map-viewer.tsx (conditional: NEXT_PUBLIC_PMTILES_URL env var)
  - When set: single PMTiles source for UAT + administrativ layers (z0-z14, ~5ms/tile)
  - When empty: fallback to Martin tile sources (existing behavior, zero breaking change)
- Add tippecanoe Docker service (profiles: tools) for on-demand PMTiles generation
- Add rebuild-overview-tiles.sh: ogr2ogr export → tippecanoe → MinIO atomic upload
- Install pmtiles npm package for MapLibre protocol registration

Performance impact:
- nginx cache: 10-100x faster on repeat tile requests, zero PostGIS load on cache hit
- PMTiles: sub-10ms overview tiles, zero PostGIS load for z0-z14

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-27 20:28:49 +02:00