On Tue, Mar 18, 2025 at 7:09 AM Rob Dennett via MapServer-users < mapserver-users@lists.osgeo.org> wrote:
> Resending this in the hopes of getting some fresh eyes on it. > > Are all parts of the mapcache.xml required, i.e. source, cache, grid, > etc? I have MapServer running as a cgi script on Apache and I want to add > MapCache in order to have cached tiles written to and read from an S3 > bucket. There are hundreds of .map files on the server machine. The > current urls look like > > Https:// <https://mymapserver.our/>mapserver.our > <https://mymapserver.our/> > organization.com/?map=/path/to/example.map&otherparams > > Do I need to create a mapcache.xml with anything more than a source with > http and a cache, a la > > <mapcache> > <source name="map-server" type="wms"> > <http> > <url>https://mapserver.ourorganization.com</url> > <connection_timeout>30</connection_timeout> > </http> > </source> > <cache name="s3" type="s3"> > <url> > https://mybucket.s3.amazonaws.com/tiles/{tileset}/{grid}/{z}/{x}/{y}.{ext} > </url> > <headers> > <Host>mybucket.s3.amazonaws.com</Host> > </headers> > <id>XXXXXXXXXXXXXXX</id> > <secret>foobaregrwq1235234532/3245234sadgfwevsd</secret> > <region>us-east-1</region> > <operation type="put"> > <headers> > <x-amz-storage-class>REDUCED_REDUNDANCY</x-amz-storage-class> > <x-amz-acl>public-read</x-amz-acl> > </headers> > </operation> > </cache> > </mapcache> > > ? > > From stuff I have found online, it seems like you need to have one of > these per .map file. Hopefully, that's not the case, but can someone > please clarify? > > Thanks, > Rob > The short answers are yes, you probably will need a <tileset> for each layer and possibly a <grid> shared between layers. And you probably need all those for each of your .map files. A mapserver .map file can contain one or more layers. A mapcache tileset can only be one layer, so worst case, you might need more than one set of mapcache definitions for each of your .map files. I'd suggest starting small. Start with one layer that gets a lot of traffic and get everything working for just that one layer and you'll start to see why each part is required. A single web app can call mapcache and mapserver for different layers so you don't need to get all your layers behind mapcache all at once. -- Richard W. Greenwood www.greenwoodmap.com
_______________________________________________ MapServer-users mailing list MapServer-users@lists.osgeo.org https://lists.osgeo.org/mailman/listinfo/mapserver-users