<div dir="ltr">Thanks for your reply,<div><br></div><div>That's right, the parameter is called STYLES not STYLE it was a typo in my email.</div><div><br></div><div>It is fine for me to create multiple caches, one per each style, that is expected. I've tried to follow your suggestion </div><div>and create separate sources and tilesets for the same layer as follows:</div><div><br></div><div><source name="<b>layerA_style1</b>" type="wms"><br> <getmap><br> <params><br> <TRANSPARENT>true</TRANSPARENT><br> <TILED>false</TILED><br> <b><LAYERS>layerA</LAYERS><br> <STYLES>style1</STYLES></b><br> </params><br> </getmap><br> <http><br> <url><a href="http://wms-geoserver-slave-svc:8080/geoserver/wms">http://wms-geoserver-slave-svc:8080/geoserver/wms</a>?</url><br> </http><br> <timeout>10</timeout><br> <connection_timeout>3</connection_timeout><br></source><br><br><source name="<b>layerA_style2</b>" type="wms"><br> <getmap><br> <params><br> <TRANSPARENT>true</TRANSPARENT><br> <TILED>false</TILED><br><b> <LAYERS>layerA</LAYERS><br> <STYLES>style2</STYLES></b><br> </params><br> </getmap><br> <http><br> <url><a href="http://wms-geoserver-slave-svc:8080/geoserver/wms">http://wms-geoserver-slave-svc:8080/geoserver/wms</a>?</url><br> </http><br> <timeout>10</timeout><br> <connection_timeout>3</connection_timeout><br></source><br></div><div><br></div><div><b> <tileset name="layerA_style1"><br> <source>l</b><b>ayerA_style1</b><b></source></b><br> <cache>multitier-cache</cache><br> <grid use_wms_intermediate_resolutions="true">EPSG4326_512</grid><br> <grid use_wms_intermediate_resolutions="true">EPSG3995_512</grid><br> <grid use_wms_intermediate_resolutions="true">EPSG3857_512</grid><br> <grid use_wms_intermediate_resolutions="true">EPSG3976_512</grid><br> <dimensions><br> <dimension type="regex" name="TIME" default="now"><br> <regex>^.*$</regex><br> </dimension><br> </dimensions><br> <format>MIXED</format><br> <metatile>1 1</metatile><br> <metabuffer>10</metabuffer><br> <expires>604800</expires><br> </tileset><br></div><div><br></div><div><b> <tileset name="layerA_style2"><br> <source>l</b><b>ayerA_style2</b><b></source></b><br> <cache>multitier-cache</cache><br> <grid use_wms_intermediate_resolutions="true">EPSG4326_512</grid><br> <grid use_wms_intermediate_resolutions="true">EPSG3995_512</grid><br> <grid use_wms_intermediate_resolutions="true">EPSG3857_512</grid><br> <grid use_wms_intermediate_resolutions="true">EPSG3976_512</grid><br> <dimensions><br> <dimension type="regex" name="TIME" default="now"><br> <regex>^.*$</regex><br> </dimension><br> </dimensions><br> <format>MIXED</format><br> <metatile>1 1</metatile><br> <metabuffer>10</metabuffer><br> <expires>604800</expires><br> </tileset> <br></div><div><br></div><div>What I observe with this updated configuration by looking at mapcache logs and the source server logs is that it</div><div>looks like the requests are always passed through to the origin WMS server and never cached in MapCache, as </div><div>if mapcache was not matching my defined sources/tilesets. Here below two sample requests:</div><div><br></div><div><font face="monospace"><a href="https://mygeoserver.com/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=">https://mygeoserver.com/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=</a><b>layerA</b>&STYLES=<b>style1</b>&WIDTH=512&HEIGHT=512&CRS=EPSG:4326&BBOX=0,-90,45,-45</font><br></div><div><br></div><div><font face="monospace"><a href="https://mygeoserver.com/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=">https://mygeoserver.com/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=</a><b>layerA</b>&STYLES=<b>style2</b>&WIDTH=512&HEIGHT=512&CRS=EPSG:4326&BBOX=0,-90,45,-45</font><br></div><div><br></div><div>Am I missing something in my configuration? </div><div><br></div><div>Another question I had while checking the <a href="https://mapserver.org/mapcache/config.html#source">documentation</a> is if the parameters specified in the <params> are used to</div><div>match the request to the given source (i.e. if the params in the incoming request match -> this is the right source configuration to use to serve the request) or</div><div>if instead are used to override the parameters in the original http request with hardcoded values.</div><div><br></div><div>Thank you,<br></div><div>Alessandro</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Sep 13, 2024 at 11:11 PM Just van den Broecke via MapServer-users <<a href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Alessandro,<br>
<br>
I try to understand your issue. Beware, I am not a MapCache expert.<br>
<br>
You mention a GetMap request and STYLE (not STYLES?) parameter. MapCache <br>
supports tiling, like WMTS GetTile, not WMS GetMap.<br>
<br>
But looking at the MapCache docs (1.8 is quite old) [1]. The <getmap> <br>
element within the <source> element may contain WMS parameters, <br>
including STYLES. These will be sent to the WMS (GeoServer) backend (as <br>
GetMap). But I see no way how one could have varying Styes for a <br>
tilecache, other than a separate cache per STYLES value.<br>
<br>
[1] <a href="https://mapserver.org/fr/mapcache/config.html" rel="noreferrer" target="_blank">https://mapserver.org/fr/mapcache/config.html</a><br>
<br>
Hope this helps!<br>
<br>
Best,<br>
<br>
Just<br>
On 13/09/2024 17:47, Alessandro Parma via MapServer-users wrote:<br>
> Dear ML,<br>
> <br>
> I am using MapCache version 1.8 and having issues with the caching <br>
> configuration of one of the layers:<br>
> <br>
> The layer in question can be requested with multiple different styles <br>
> but it looks like the STYLE parameter in<br>
> the GetMap requests is ignored and I get the same cached tiles no matter <br>
> what the style value of the request is.<br>
> <br>
> This is a snippet of the configuration:<br>
> ...<br>
> <source name="mtg_fd:ir105_hrfi" type="wms"><br>
> <getmap><br>
> <params><br>
> <TRANSPARENT>true</TRANSPARENT><br>
> <TILED>false</TILED><br>
> <LAYERS>mtg_fd:ir105_hrfi</LAYERS><br>
> </params><br>
> </getmap><br>
> <http><br>
> <url><a href="http://wms-geoserver-slave-svc:8080/geoserver/wms" rel="noreferrer" target="_blank">http://wms-geoserver-slave-svc:8080/geoserver/wms</a> <br>
> <<a href="http://wms-geoserver-slave-svc:8080/geoserver/wms" rel="noreferrer" target="_blank">http://wms-geoserver-slave-svc:8080/geoserver/wms</a>>?</url><br>
> </http><br>
> <timeout>10</timeout><br>
> <connection_timeout>3</connection_timeout><br>
> </source><br>
> <br>
> <tileset name="mtg_fd:ir105_hrfi"><br>
> <source>mtg_fd:ir105_hrfi</source><br>
> <cache>multitier-cache</cache><br>
> <grid use_wms_intermediate_resolutions="true">EPSG4326_512</grid><br>
> <grid use_wms_intermediate_resolutions="true">EPSG3995_512</grid><br>
> <grid use_wms_intermediate_resolutions="true">EPSG3857_512</grid><br>
> <grid use_wms_intermediate_resolutions="true">EPSG3976_512</grid><br>
> <dimensions><br>
> <dimension type="regex" name="TIME" default="now"><br>
> <regex>^.*$</regex><br>
> </dimension><br>
> </dimensions><br>
> <format>MIXED</format><br>
> <metatile>1 1</metatile><br>
> <metabuffer>10</metabuffer><br>
> <expires>604800</expires><br>
> </tileset><br>
> ...<br>
> <br>
> Do you have any suggestions?<br>
> <br>
> -- <br>
> <br>
> Regards, Alessandro Parma == GeoServer Professional Services from the <br>
> experts! Visit <a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a> <<a href="http://goo.gl/it488V" rel="noreferrer" target="_blank">http://goo.gl/it488V</a>> for more <br>
> information. == Alessandro Parma Technical Lead / Senior DevOps Engineer <br>
> GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) Italy <br>
> phone: +39 340 4752467 fax: +39 0584 1660272 <br>
> <a href="https://www.geosolutionsgroup.com" rel="noreferrer" target="_blank">https://www.geosolutionsgroup.com</a> <<a href="https://www.geosolutionsgroup.com" rel="noreferrer" target="_blank">https://www.geosolutionsgroup.com</a>> <br>
> <a href="https://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">https://twitter.com/geosolutions_it</a> <br>
> <<a href="https://twitter.com/geosolutions_it" rel="noreferrer" target="_blank">https://twitter.com/geosolutions_it</a>> <br>
> ------------------------------------------------------- Con riferimento <br>
> alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - <br>
> Regolamento generale sulla protezione dei dati “GDPR”), si precisa che <br>
> ogni circostanza inerente alla presente email (il suo contenuto, gli <br>
> eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i <br>
> solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è <br>
> giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è <br>
> illecita. Le sarei comunque grato se potesse darmene notizia. This email <br>
> is intended only for the person or entity to which it is addressed and <br>
> may contain information that is privileged, confidential or otherwise <br>
> protected from disclosure. We remind that - as provided by European <br>
> Regulation 2016/679 “GDPR” - copying, dissemination or use of this <br>
> e-mail or the information herein by anyone other than the intended <br>
> recipient is prohibited. If you have received this email by mistake, <br>
> please notify us immediately by telephone or e-mail.<br>
> <br>
> <br>
> _______________________________________________<br>
> MapServer-users mailing list<br>
> <a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
> <a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
<br>
_______________________________________________<br>
MapServer-users mailing list<br>
<a href="mailto:MapServer-users@lists.osgeo.org" target="_blank">MapServer-users@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</blockquote></div><br clear="all"><div><br></div><span class="gmail_signature_prefix">-- </span><br><div dir="ltr" class="gmail_signature"><div dir="ltr"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><font face="Arial"><span style="white-space:pre-wrap">Regards,
Alessandro Parma
==
GeoServer Professional Services from the experts! Visit <a href="http://goo.gl/it488V" target="_blank">http://goo.gl/it488V</a> for more information.
==
Alessandro Parma
Technical Lead / Senior DevOps Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 340 4752467
fax: +39 0584 1660272
<a href="https://www.geosolutionsgroup.com" target="_blank">https://www.geosolutionsgroup.com</a>
<a href="https://twitter.com/geosolutions_it" target="_blank">https://twitter.com/geosolutions_it</a>
-------------------------------------------------------
Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia.
This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.</span></font><br></p></div></div>