Cache disk QGIS server plugin for WMTS tiles
image/*
)See https://georezo.net/wiki/main/standards/wmts
The plugin is configured with environment variables:
QGIS_WMTS_CACHE_ROOTDIR
Root directory for cached data
Default to: tempfile.getmpdir()
/org.qgis.wmts/
QGIS_WMTS_CACHE_LAYOUT
Storage layout for tiles
Possible values: tc
,mp
,tms
,reverse_tms
Default value: tc
tc
: TileCache compatible layout, (zz/xxx/xxx/xxx/yyy/yyy/yyy.format
)mp
: MapProxy layout (zz/xxxx/xxxx/yyyy/yyyy.format
), moins de niveaux de repertoiretms
: TMS compatible layout (zz/xxxx/yyyy.format
)The layout must be chosen according to the expected size of the cache: more the cache contains elements, more the number of directory levels must be important.
A cli manager command may be installed in the python environment using standard setuptools/pip installation.
Once installed, the wmtscache
cache command can be used to manage the cache content:
The WMTS Cache manager API provides these URLs:
/wmtscache/?
/wmtscache/collections/?
/wmtscache/collection/(?<collectionId>[^/]+)/?
/wmtscache/collection/(?<collectionId>[^/]+)/docs/?
/wmtscache/collection/(?<collectionId>[^/]+)/layers/?
/wmtscache/collection/(?<collectionId>[^/]+)/layers/(?<layerid>[^/]+)/?
To delete some cache, you have to use Delete HTTP method over the dedicated URL.