gws.plugin.admin_action.mapcache¶
Cache viewer: an html page to inspect cached tiles.
The page lists all tile caches from the cache inventory (gws.gis.cache.core)
with per-level statistics, and shows the cached tiles of a selected cache and
level on an OpenLayers map. It is served by the adminMapCache command of the
admin action.
Paths:
empty: the overview page.
<cache>,<cache>/<z>: the page with a cache and level selected (level 0 by default).<cache>/<z>/<x>/<y>.<ext>: a single cached tile as PNG, or an empty 204 response if the tile is not cached.ol.js,ol.css,proj4.js,page.js,page.css: page assets.
Example:
/_/adminMapCache?path=
/_/adminMapCache?path=<cache name>/12
Source code: gws.plugin.admin_action.mapcache
Package Contents¶
- gws.plugin.admin_action.mapcache.get_content(root: gws.Root, path: str) gws.ContentResponse¶
Render the cache viewer page, a cached tile or a page asset.
- Parameters:
root – The configuration root.
path – Page, tile or asset path.
- Returns:
The rendered page, the tile image or the asset.
- Raises:
gws.NotFoundError – If the path is invalid or the cache or level is not found.