3.6.10 About Cache in Spatial Studio
Starting with Spatial Studio release 22.3, all vector tiles generated for all datasets are cached to the file system by default.
This cache process automatically begins when the you first load a dataset for map visualization and start panning the map or zoom in and out on the map. Therefore, the next time the same dataset is visualized, all the corresponding map layers load faster as the relevant tiles have been already generated and are ready to be loaded. All these generated vector tiles will be saved under:
<user_home_folder>/.sgtech/cache/CACHE_<cache_id>
The <cache_id> which is part of the folder name is an
integer value, calculated based on the dataset id
and the
geometry column being encoded in the vector tiles. A metadata file will be
saved inside each cache
folder to provide human-readable
information about where the tiles belong to in a tiles.json
file. A sample structure of the metadata file is as shown:
{
"DatasetName" : "DATASET NAME",
"DatasetId" : "8da55629d3ca71aa37d859422a847257",
"GeometryColumn" : "GEOM_COL_NAME"
}
Each vector tile will be encoded and saved to a file that follows a name pattern as shown:
<zoom_level>_<x_axis>_<y_axis>.dat
All the variables in the preceding name pattern are replaced by an integer and denote the world position where the tile needs to be loaded when looking at a certain viewport of the world map.
The cache options (Pre-cache and Purge cache) for a dataset can be accessed from the Datasets page as shown:
- Pre-Cache
You can trigger a pre-caching task to start generating vector tiles even before a map is loaded with the dataset for visualization. - Purge Cache
You can wipe the cached tiles by calling the Purge cache option.
Parent topic: Spatial Studio Datasets Page