<div dir="ltr"><div>Well, maybe I'm not getting it right but it seems to me that this file: <br><br><a href="https://github.com/mapserver/mapcache/blob/master/lib/source_mapserver.c">https://github.com/mapserver/mapcache/blob/master/lib/source_mapserver.c</a><br>
<br></div>and this example in the <a href="https://github.com/mapserver/mapcache/blob/master/mapcache.xml.sample">https://github.com/mapserver/mapcache/blob/master/mapcache.xml.sample</a>: <br><br><div><div class="" id="LC563">
<source name="osm" type="wms"></div><div class="" id="LC564"> <http></div><div class="" id="LC565"> <url><a href="http://localhost/cgi-bin/mapserv">http://localhost/cgi-bin/mapserv</a>?</url></div>
<div class="" id="LC566"> </http></div><div class="" id="LC567"> <getmap></div><div class="" id="LC568"> <params></div><div class="" id="LC569"> <FORMAT>image/png</FORMAT></div>
<div class="" id="LC570"> <LAYERS>default</LAYERS></div><div class="" id="LC571"> <!--<MAP>/Users/tbonfort/dev/mapserver-utils/empty.map</MAP>--></div><div class="" id="LC572">
<MAP>/Users/tbonfort/dev/mapserver-utils/osm-google.map</MAP></div><div class="" id="LC573"> </params></div><div class="" id="LC574"> </getmap></div><div class="" id="LC575">
</source></div><br></div><div>would suggest that, although not documented, mapcache might be able to talk to mapserver through the cgi protocol if built with the USE_MAPSERVER flag. I can't wait to test it!<br>
<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Sep 19, 2013 at 11:08 PM, Stephen Woodbridge <span dir="ltr"><<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, I would be interested in hearing how you work this out. It might help to remember that mapcache ONLY talks to mapserver via the WMS protocol, NOT the mapserver CGI protocol. This is a big difference from TileCache. Anyway good luck with your efforts.<br>
<br>
-Steve<div class="im"><br>
<br>
On 9/19/2013 10:00 PM, Pablo Cecconi wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
The problem is not the invalidation of the tiles (which is a very simple<br>
step that can even be done with a simple bash script) but the need to<br>
list every single layer with status ON on the mapfile. To do that<br>
automatically we need to use mapscript (as TileCache does) but we also<br>
need to deal with generating a valid mapcache config file (which we<br>
cannot do with mapscript). With TileCache instead we just mapped a given<br>
layer name with a mapfile and we only had to care about invalidating and<br>
reseeding of tiles and not with modifying TileCache config file. It's<br>
not so bad though. I just thought that being part of Mapserver maybe<br>
MapCache could have some kind of "special integration" with it.<br>
Anyway, I'll continue digging to see if I find some easier way to deal<br>
with this particular problem and if I do I promise to let you know.<br>
Thanks again.<br>
<br>
Pablo<br>
<br>
<br>
<br>
On Thu, Sep 19, 2013 at 10:18 PM, Stephen Woodbridge<br></div><div><div class="h5">
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>> wrote:<br>
<br>
Try it, it might work, I don't remember, but you still have the<br>
problem of invalidating the tiles when you changes the mapfile. But<br>
seriously, your approach seems a little haphazard. Also how often to<br>
you make mapfile changes? how did you deal with the invalidating<br>
cache problem before?<br>
<br>
The big difference here is that mapcache is using mapserver as a WMS<br>
source and therefore it has to conform to the WMS rules.<br>
<br>
Anyway, Thomas is the one that you would need to convince or fund if<br>
you want changes to the existing behavior. Meanwhile it would be<br>
worthwhile your time to figure out how it curently works before<br>
asking for features that might already exist. It has been a few<br>
months since I setup a mapcache instance and I know there have been<br>
changes that I'm not on top of in the newest release.<br>
<br>
-Steve<br>
<br>
<br>
On 9/19/2013 3:46 PM, Pablo Cecconi wrote:<br>
<br>
The problem with that approach is that is the mapfile changes (a<br>
layer<br>
is added or the default status of a layer changes) then I also<br>
have to<br>
update mapcache config file. What i wonder is if there is a way<br>
to just<br>
modify the map and have Mapcache reflecting that change.<br>
<br>
Pablo<br>
<br>
<br>
On Thu, Sep 19, 2013 at 4:40 PM, Stephen Woodbridge<br>
<<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.com</a> <mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>><br></div></div>
<mailto:<a href="mailto:woodbri@swoodbridge." target="_blank">woodbri@swoodbridge.</a>__<u></u>com<div><div class="h5"><br>
<mailto:<a href="mailto:woodbri@swoodbridge.com" target="_blank">woodbri@swoodbridge.<u></u>com</a>>>> wrote:<br>
<br>
On 9/19/2013 3:02 PM, Pablo Cecconi wrote:<br>
<br>
Hello,<br>
<br>
I've been a Mapserver user for many years now but I'm<br>
new to<br>
Mapcache<br>
and I'm not sure whether it's possible to replicate a<br>
particular<br>
TileCache setup using Mapcache.<br>
What we have today is a number of mapfiles (with<br>
Mapserver 5.4)<br>
set up<br>
as WMS-C layers served with TileCache. We're migrating<br>
to Mapserver<br>
6.2.1 and as it's incompatible with TileCache we expect<br>
to be<br>
able to<br>
replace it using Mapcache.<br>
In our current setup if I have a mapfile where a particular<br>
layer has<br>
STATUS OFF then TileCache will honor that status and<br>
not render<br>
the layer.<br>
I'd like to know whether it's possible to have MapCache<br>
work<br>
that way,<br>
that is, passing the map name as the LAYERS parameter<br>
of the WMS<br>
service<br>
and make it honor whatever STATUS a particular layer<br>
would have<br>
in the<br>
mapfile.<br>
<br>
<br>
I think the mapcache paradigm for this in mapcache works<br>
like this:<br>
<br>
tileset<br>
name=foo<br>
source=foo-source<br>
<br>
source<br>
name=foo-source<br>
map=/path/to/mapfile<br></div></div>
layers=layer1,layer2,layers3,.<u></u>____..<div class="im"><br>
<br>
<br>
So you can configure which layers a tileset returns. I'm<br>
not sure<br>
how it deals with the status off, but it will work if you<br>
define the<br>
list explicitly. This also allow you to do this in the same<br>
mapcache.xml<br>
<br>
tileset<br>
name=foo2<br>
source=foo-source2<br>
<br>
source<br>
name=foo-source2<br>
map=/path/to/mapfile<br>
layers=streets,...<br>
transparent=true<br>
<br>
I do this a lot when I have a subset of data like streets<br>
that I<br>
want to render as an overly on a raster image<br>
<br>
-Steve W<br></div>
______________________________<u></u>_____________________<br>
mapserver-users mailing list<br>
mapserver-users@lists.osgeo.__<u></u>__org<br>
<mailto:<a href="mailto:mapserver-users@lists." target="_blank">mapserver-users@lists.</a><u></u>__<a href="http://osgeo.org" target="_blank">osgeo.org</a><br>
<mailto:<a href="mailto:mapserver-users@lists.osgeo.org" target="_blank">mapserver-users@lists.<u></u>osgeo.org</a>>><br>
<a href="http://lists.osgeo.org/____mailman/listinfo/mapserver-____users" target="_blank">http://lists.osgeo.org/____<u></u>mailman/listinfo/mapserver-___<u></u>_users</a><br>
<<a href="http://lists.osgeo.org/__mailman/listinfo/mapserver-__users" target="_blank">http://lists.osgeo.org/__<u></u>mailman/listinfo/mapserver-__<u></u>users</a>><br>
<br>
<<a href="http://lists.osgeo.org/__mailman/listinfo/mapserver-__users" target="_blank">http://lists.osgeo.org/__<u></u>mailman/listinfo/mapserver-__<u></u>users</a><br>
<<a href="http://lists.osgeo.org/mailman/listinfo/mapserver-users" target="_blank">http://lists.osgeo.org/<u></u>mailman/listinfo/mapserver-<u></u>users</a>>><br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
</blockquote></div><br></div>