<div dir="ltr"><div dir="ltr">On Tue, Mar 18, 2025 at 7:09 AM Rob Dennett via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:</div><div class="gmail_quote gmail_quote_container"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="msg-3969992507202177008">
<div dir="ltr">
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Resending this in the hopes of getting some fresh eyes on it.</div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
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<br>
<br>
</div>
<div style="text-align:left;text-indent:0px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<a href="https://mymapserver.our/" id="m_-3969992507202177008OWAd265e873-401a-eb99-2531-199f8a053a55" title="Https://myMapServer.our" rel="noopener noreferrer" style="margin:0px" target="_blank">Https://</a>mapserver<a href="https://mymapserver.our/" id="m_-3969992507202177008OWAfe1650a8-1b69-5a3c-b951-d9c873bb23b6" title="Https://myMapServer.our" rel="noopener noreferrer" style="margin:0px" target="_blank">.our</a><a href="http://organization.com/?map=/path/to/example.map&otherparams" target="_blank">organization.com/?map=/path/to/example.map&otherparams</a><br>
<br>
Do I need to create a mapcache.xml with anything more than a source with http and a cache, a la <br>
<br>
</div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<mapcache></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<source name="map-server" type="wms"></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<http></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<url><a href="https://mapserver.ourorganization.com" target="_blank">https://mapserver.ourorganization.com</a></url></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<connection_timeout>30</connection_timeout></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</http></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</source></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<cache name="s3" type="s3"></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<url><a href="https://mybucket.s3.amazonaws.com/tiles/%7Btileset%7D/%7Bgrid%7D/%7Bz%7D/%7Bx%7D/%7By%7D.%7Bext%7D" target="_blank">https://mybucket.s3.amazonaws.com/tiles/{tileset}/{grid}/{z}/{x}/{y}.{ext}</a></url></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<headers></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<Host><a href="http://mybucket.s3.amazonaws.com" target="_blank">mybucket.s3.amazonaws.com</a></Host></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</headers></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<id>XXXXXXXXXXXXXXX</id></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<secret>foobaregrwq1235234532/3245234sadgfwevsd</secret></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<region>us-east-1</region></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<operation type="put"></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<headers></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<x-amz-storage-class>REDUCED_REDUNDANCY</x-amz-storage-class></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<x-amz-acl>public-read</x-amz-acl></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</headers></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</operation></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</cache></div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
</mapcache><br>
<br>
?</div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
>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?</div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks,</div>
<div style="text-align:left;text-indent:0px;line-height:19px;margin:0px;font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Rob</div></div></div></blockquote><div><br></div><div>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.</div><div><br></div><div>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. </div><div> </div></div><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr">Richard W. Greenwood<br><a href="http://www.greenwoodmap.com" target="_blank">www.greenwoodmap.com</a></div></div></div>