<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Map Image Layer caching process in ArcGIS Hub Questions</title>
    <link>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788280#M3884</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a custom State Plane basemap for use in Collector (to collect in SP coordinates)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The basemap has 9 levels of detail, and around 500MB of tiles. When I published this to our federated server site, I used the option to have the server handle the tile caching automatically. I do not know if this is best process or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There aren't too many layers in the basemap that change much (other than streets) and I am unsure how to handle the re-caching. Does the server re-cache when the map service gets recycled every night? Or are there some tools I could run via Python or Geoprocessing tab in ArcMap/ArcPro to ensure the cache on this service does not grow stale.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Jul 2020 14:58:14 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2020-07-23T14:58:14Z</dc:date>
    <item>
      <title>Map Image Layer caching process</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788280#M3884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a custom State Plane basemap for use in Collector (to collect in SP coordinates)&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The basemap has 9 levels of detail, and around 500MB of tiles. When I published this to our federated server site, I used the option to have the server handle the tile caching automatically. I do not know if this is best process or not.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There aren't too many layers in the basemap that change much (other than streets) and I am unsure how to handle the re-caching. Does the server re-cache when the map service gets recycled every night? Or are there some tools I could run via Python or Geoprocessing tab in ArcMap/ArcPro to ensure the cache on this service does not grow stale.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jul 2020 14:58:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788280#M3884</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-07-23T14:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: Map Image Layer caching process</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788281#M3885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So what I do is this: each week I overwrite the feature classes in my filegdb that support the map.&amp;nbsp; Now the data in the map is overwritten but the cache tiles are not.&amp;nbsp; They have to be re-created.&amp;nbsp; Using the Pro Idle, here's how that looks:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="comment token"&gt;# List of input variables for map service properties&lt;/SPAN&gt;
portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SignInToPortal&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"https://yourportal"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"yourname"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"yourpw"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
env&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;workspace &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"\\yourserver\.....\\DataConnections\\SqlProdSp.gdb"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# must be registered location&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;try&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 input_service &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://......yourCacheService/MapServer"&lt;/SPAN&gt;
 scales &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;577790.554289&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;288895.277144&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;144447.638572&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;72223.819286&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;36111.909643&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#0,1,2,3,4,5,6,7 full ext&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;#scales = [9027.977411,4513.988705,2256.994353,1128.497176,564.248588] # mid ext&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;#scales = [282.124294] #8,9,10,11,12,13] #,14,15 tilemapped # low ext&lt;/SPAN&gt;
 update_mode &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"RECREATE_ALL_TILES"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;# DELETE_TILES&lt;/SPAN&gt;
 update_extent &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"412741.7365287468 915208.8897668198 672826.0004799105 1141077.7300229892"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#"XMin, YMin, XMax, YMax" stateplane&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;#update_extent = "-9200240.24964 3116183.75439 -9132965.67576 3172857.76957" #"XMin, YMin, XMax, YMax" webmercator&lt;/SPAN&gt;
 num_of_caching_service_instances &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"-1"&lt;/SPAN&gt; &lt;SPAN class="comment token"&gt;#14 don't need in pro&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;scales&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 area_of_interest &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;""&lt;/SPAN&gt;
 wait_for_job_completion &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"WAIT"&lt;/SPAN&gt;
 portal_url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"https://yourportal"&lt;/SPAN&gt;

result &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ManageMapServerCacheTiles_server&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;input_service&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; scales&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; update_mode&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; num_of_caching_service_instances&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; area_of_interest&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; update_extent&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; wait_for_job_completion&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;portal_url&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
 
 &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Created cache tiles for scale = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;scales&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" and service at "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; input_service &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" using the full extent"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; 
 message &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; message &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Created cache tiles for scales = "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; str&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;scales&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" "&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; input_service &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" using the full extent"&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;except&lt;/SPAN&gt; Exception&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;# If an error occurred, print line number and error message&lt;/SPAN&gt;
 &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; traceback&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; sys
 tb &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;exc_info&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;2&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 e &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;exc_info&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;#print(e.args[0])&lt;/SPAN&gt;
 &lt;SPAN class="comment token"&gt;#print "Line %i" % tb.tb_lineno&lt;/SPAN&gt;
 message &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; message &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\n"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"Line %i"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;%&lt;/SPAN&gt; tb&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;tb_lineno
 message &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; message &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"\n"&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;+&lt;/SPAN&gt; e&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;message‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I have done is set up the cache tiling scheme to use the same levels as the web mercator tile scheme, because it works so well in the field, but I can still use stateplane coord system.&amp;nbsp; The cache levels in the service go all the way down to 1:70, but I only cache to 1:564 and then use the 'tilemap' capability on the service so that the service 'maps tiles' down to the lowest level.&amp;nbsp; &amp;nbsp;The 'full ext' scale array above takes like 1 minute.&amp;nbsp; The 'mid ext' scale array takes about 50 minutes on our system. I run this as 2 scripts in a scheduled task.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:00:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788281#M3885</guid>
      <dc:creator>DavidColey</dc:creator>
      <dc:date>2021-12-12T09:00:21Z</dc:date>
    </item>
    <item>
      <title>Re: Map Image Layer caching process</title>
      <link>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788282#M3886</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Great help David, Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have gotten in the habit of using Pro for just about everything now. It's just so much easier that way.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Sep 2020 15:39:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-hub-questions/map-image-layer-caching-process/m-p/788282#M3886</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-09-24T15:39:33Z</dc:date>
    </item>
  </channel>
</rss>

