I have already implemented a tile server using xyz tile system and geotools for rendering tile image,now i have to cache my tile image which is a png image 256*256(always) of size ,i am not using geowebcache because i think it 's not suitable for a webmapping application where features geometry and layer style can change daily,so i am using xyz systems instead of using bbox or wms requests, i find a good article on serving tiles as mvt (mapbox vector tiles) from postgis at https://medium.com/geolytix/xyz-dynamic-vector-tiles-created-on-the-fly-cached-and-updated-directly-in-postgis-37db33c31450,for my case unstead of caching an mvt i will cache a raster tile ,the same as a bytearray
ex:
create table if not exists tile_cache
(
z integer not null,
x integer not null,
y integer not null,
mvt tile,
bbox geometry(Polygon,4326),
constraint tile_cache_x_y_pk
primary key (z, x, y)
)
;
create index if not exists tile_cache_z_x_y_idx
on tile_cache (z, x, y)
;
it will create an xyz index to speed up thinks,
so i was wondering what is the best and faster solution ?
Serving tiles from postgis table using xyz index or serving directly from file system.
question from:
https://stackoverflow.com/questions/65601165/what-is-the-best-solution-to-store-a-tile-cache-in-a-file-system-or-a-database 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…