/content/guides/simstad/simstad.png

Recache

Contributors

mange61
guser40

Funding

formas
smartbuilt

Recache

The Recache method instructs Unreal to reload data layers from disk. Calling a recache operation ensures that all active data reflects the latest content on disk.

A recache is initiated using a RecacheRequest. Unreal reports progress using RecacheResponse messages until the operation is complete.

RecacheRequest

Starts a recaching operation. Unreal will scan the default media directory and refresh its cached data layers. By default, this operations recaches all available rasters.

nametyperequireddescription
typestring✓"RecacheRequest"
rastersarrayOptional list of specific rasters to recache.

Example request:

{
  "type": "RecacheRequest",
  "rasters": ["OverviewMap", "UpdatedRaster"]
}

RecacheResponse

Sent repeatedly during the recache process to indicate progress.

nametypedescription
typestring"RecacheResponse"
indexnumberNumber of items processed so far.
maxnumberTotal number of items to process in the recache operation.

Example response:

{
  "type": "RecacheResponse",
  "index": 10,
  "max": 250
}