<div dir="ltr"><div dir="ltr">I do this all the time to create static versions of assets. Typically I just use a bash script and wget but I can't think of a reason offhand why curl wouldn't work just fine. What does a curl call look like?<br></div><div><br></div><div>--Steve</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Dec 14, 2023 at 3:32 PM Schweitzer, Peter N 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"><div class="msg1331509696131048259">




<div dir="ltr">
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
I have map interfaces that use a dozen or so legend graphics, but it requires separate calls to mapserver for every user.  I would prefer to cache these images (PNG) rather than make mapserver recalculate the same legend graphic many times for each user session. 
 But when I do a curl, I keep getting the "requires a TEMPLATE" message.  The images work within my JS (OpenLayers 5.3), but not through a stand-alone web request.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Example:  <a href="https://mrdata.usgs.gov/general/map-global.html" target="_blank">https://mrdata.usgs.gov/general/map-global.html</a>  27 calls to mapserv to get legend images that don't change.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Is there a way I can get these images and cache them on the server so that mapserver doesn't have to chew up processor cycles and time for them every time?</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Thanks for any help you may be able to offer.</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
Peter</div>
<div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<br>
</div>
<div id="m_1331509696131048259Signature">
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif;font-size:12pt;color:rgb(0,0,0)">
<span style="font-size:14.6667px;color:rgb(50,49,48);background-color:rgb(255,255,255)">Peter N. Schweitzer (U.S. Geological Survey, Reston, VA 20192)</span><br>
<span style="font-size:14.6667px;color:rgb(50,49,48);background-color:rgb(255,255,255)">(703) 648-6533  email: <a href="mailto:pschweitzer@usgs.gov" target="_blank">pschweitzer@usgs.gov</a></span><br>
<span style="font-size:14.6667px;background-color:rgb(255,255,255)"><a href="https://www.usgs.gov/staff-profiles/peter-n-schweitzer" rel="noopener noreferrer" style="margin:0px;text-align:left;background-color:rgb(255,255,255)" target="_blank">https://www.usgs.gov/staff-profiles/peter-n-schweitzer</a></span><br>
<span style="font-size:14.6667px;background-color:rgb(255,255,255)"><a href="https://orcid.org/0000-0002-9532-6681" rel="noopener noreferrer" style="margin:0px;text-align:left;background-color:rgb(255,255,255)" target="_blank">https://orcid.org/0000-0002-9532-6681</a></span><br>
</div>
</div>
</div>
</div>
</div>

_______________________________________________<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>
</div></blockquote></div></div>