Skip to main content

MapCache and Caching Operations

Cache Role in the Stack

MapCache reduces repeat GetMap rendering cost and can serve cached outputs for supported request shapes and projections.

Storage Layout

The tile cache lives in the shared volume mounted at:

/var/sig/tiles

The API and worker mount the same location through MAPCACHE_CACHE_DIR, which allows inspection and cleanup from the application layer.

Cache Management Routes

RoutePurpose
GET /mapcache/cache/layersinspect known cached layers
POST /mapcache/cache/cleanupremove cache entries with filters and dry-run
POST /mapcache/cache/cleanup-layersremove whole cache layer trees
POST /mapcache/reloadrefresh MapCache config

Seeding Model

Startup-wide seeding has been removed. Controlled warming is now done through:

  • explicit seed routes
  • ingest-triggered seeding when mapcache_seed_on_ingest is enabled

This prevents the stack from overwhelming the host at startup.

Native Projection Support

The generated MapCache config now includes:

  • web mercator and WGS84 grids
  • native EPSG:32633 grid generation for matching datasets
  • per-layer restricted extents
  • WMS assembly configuration

Known Operational Caveats

  • Apache must own or be able to write the layer directories under the cache root
  • recreating cache directories as root can produce false-negative cache tests because MapCache cannot write tiles afterward
  • unsupported request grids still need the WMS fallback path to keep user-facing requests healthy