Show what's actually cached per-country, with a delete button per row
The only visibility into downloaded data was the whole offline.pmtiles row, and the only delete was "everything" (whole file + whole cache). GET /api/offline-tiles/cache lists what's really in data/geofabrik_cache/ right now — distinct from offline.pmtiles' own meta.sources, which only reflects the last successful build and can disagree with both the current selection and the cache (ticked-but- not-Applied, or built-from-but-since-unticked). The region picker now shows each cached country's size next to its checkbox, with its own delete button (DELETE /api/offline-tiles/cache/:code, already added but unused by the UI until now) — removing just that entry rather than clearing the whole cache.
This commit is contained in:
1 parent
d09d953cbf
commit
78362d51f2
7 files changed
+158
-6
No files matched your search
@@ -147,7 +147,15 @@ which only changes what a *future* build covers and never frees
|
||||
anything already on disk. `DELETE
|
||||
/api/offline-tiles/cache/:code` removes just one country's cached
|
||||
extract, e.g. to force a clean re-download of it without touching the
|
||||
rest of the cache.
|
||||
rest of the cache. `GET /api/offline-tiles/cache` lists what's
|
||||
actually in that cache right now (code/size/Last-Modified per file) —
|
||||
not the same thing as offline.pmtiles' own `meta.sources`, which only
|
||||
reflects the last successful build: a country can be cached without
|
||||
ever having been built (ticked, not yet Applied) or built from without
|
||||
still being selected (unticked since). The region picker shows this
|
||||
next to each country's checkbox, with its own delete button, rather
|
||||
than only offering "delete everything" on the whole offline.pmtiles
|
||||
row.
|
||||
|
||||
Each successful build also writes a small sidecar (`offline.pmtiles.
|
||||
meta.json` — each source country's code/Geofabrik slug/Last-Modified;
|
||||
|
||||
Reference in new issue
Block a user