<?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 Linking pre-calculated cache to sddraft to a publishing map service on a standalone server in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/linking-pre-calculated-cache-to-sddraft-to-a/m-p/1295312#M67778</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to replicate the workflow of publishing a WMTS service that has cache from ArcGISPro with python (outside of ArcGIS pro environment / standalone script). The issue is that I have &lt;STRONG&gt;pre-calculated cache&lt;/STRONG&gt; available for my service and would like to &lt;STRONG&gt;include&lt;/STRONG&gt; it programmatically.&amp;nbsp;The precalculated cache folder name starts with the server folder followed by the map service name as such: &lt;STRONG&gt;{folder}_{map service name}&lt;/STRONG&gt;.&amp;nbsp;I've added the precalculated cache to a server folder that i've linked in the &lt;STRONG&gt;manager &lt;EM&gt;site&lt;/EM&gt;&lt;/STRONG&gt; tab as type: Cache (see image below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicolasRojas_0-1685707487465.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/72254i2A9AC82433CDF718/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicolasRojas_0-1685707487465.png" alt="NicolasRojas_0-1685707487465.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;In pro:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- I've connected to my standalone server and did right click -&amp;gt; publish.&lt;/P&gt;&lt;P&gt;- In the publish map properties I check the box 'Use existing cache' and I get the message that the cache folder with the service name was found.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All good. In the server's manager the cache is there and it's available through the rest api.&lt;/P&gt;&lt;P&gt;&lt;U&gt;In python:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- I started by looking at the temp sddraft Pro used to publish my service. I realised that a few values regarding cache were different so i changed to following:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;schemaLockingEnabled&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;isCached&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;useLocalCacheDir&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;clientCachingAllowed&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;cacheDir&lt;/STRONG&gt; -&amp;gt; {path/to/created/cache/folder}&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;- I also added the xml node '&lt;STRONG&gt;useExistingCache&lt;/STRONG&gt;' -&amp;gt; true that wasn't there before.&lt;/P&gt;&lt;P&gt;When I run my code, during the analysis I recieve the error message:&amp;nbsp;&lt;STRONG&gt;WARNING 086225: A pre-existing cache was found on the server for the service being published (Orphan cache found).&amp;nbsp;&lt;/STRONG&gt;But the precalculated cache is not linked.&lt;/P&gt;&lt;P&gt;I've also tried to add the tile schema to the sddraft in the key '&lt;STRONG&gt;TileCacheSchemaFile&lt;/STRONG&gt;' -&amp;gt; {path/to/schema} without any changes to the error message.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;q1:&lt;/STRONG&gt; How do I go about doing this task without the error? I can't seem to find the right documentation about this on the esri platform&lt;/P&gt;&lt;P&gt;It seems the analyzer finds the cache folder but doen't link the scheme like it does in Pro. Am I missing a key in the sddraft to allow it to change the scheme if it finds one?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;q2:&lt;/STRONG&gt; How is the error not findable with a google search?&lt;/P&gt;&lt;P&gt;I'm aware that sddrafts comming from ArcGIS Pro are quite different from sddrafts made with arcpy.&lt;/P&gt;&lt;P&gt;Thanks for reading, anything helps at this point hahaha&lt;/P&gt;</description>
    <pubDate>Fri, 02 Jun 2023 12:11:31 GMT</pubDate>
    <dc:creator>NicolasRojas</dc:creator>
    <dc:date>2023-06-02T12:11:31Z</dc:date>
    <item>
      <title>Linking pre-calculated cache to sddraft to a publishing map service on a standalone server</title>
      <link>https://community.esri.com/t5/python-questions/linking-pre-calculated-cache-to-sddraft-to-a/m-p/1295312#M67778</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I am trying to replicate the workflow of publishing a WMTS service that has cache from ArcGISPro with python (outside of ArcGIS pro environment / standalone script). The issue is that I have &lt;STRONG&gt;pre-calculated cache&lt;/STRONG&gt; available for my service and would like to &lt;STRONG&gt;include&lt;/STRONG&gt; it programmatically.&amp;nbsp;The precalculated cache folder name starts with the server folder followed by the map service name as such: &lt;STRONG&gt;{folder}_{map service name}&lt;/STRONG&gt;.&amp;nbsp;I've added the precalculated cache to a server folder that i've linked in the &lt;STRONG&gt;manager &lt;EM&gt;site&lt;/EM&gt;&lt;/STRONG&gt; tab as type: Cache (see image below).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NicolasRojas_0-1685707487465.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/72254i2A9AC82433CDF718/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NicolasRojas_0-1685707487465.png" alt="NicolasRojas_0-1685707487465.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;U&gt;In pro:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- I've connected to my standalone server and did right click -&amp;gt; publish.&lt;/P&gt;&lt;P&gt;- In the publish map properties I check the box 'Use existing cache' and I get the message that the cache folder with the service name was found.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;&lt;P&gt;All good. In the server's manager the cache is there and it's available through the rest api.&lt;/P&gt;&lt;P&gt;&lt;U&gt;In python:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;- I started by looking at the temp sddraft Pro used to publish my service. I realised that a few values regarding cache were different so i changed to following:&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;&lt;STRONG&gt;schemaLockingEnabled&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;isCached&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;useLocalCacheDir&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;clientCachingAllowed&lt;/STRONG&gt; -&amp;gt; true&lt;/LI&gt;&lt;LI&gt;&lt;STRONG&gt;cacheDir&lt;/STRONG&gt; -&amp;gt; {path/to/created/cache/folder}&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;- I also added the xml node '&lt;STRONG&gt;useExistingCache&lt;/STRONG&gt;' -&amp;gt; true that wasn't there before.&lt;/P&gt;&lt;P&gt;When I run my code, during the analysis I recieve the error message:&amp;nbsp;&lt;STRONG&gt;WARNING 086225: A pre-existing cache was found on the server for the service being published (Orphan cache found).&amp;nbsp;&lt;/STRONG&gt;But the precalculated cache is not linked.&lt;/P&gt;&lt;P&gt;I've also tried to add the tile schema to the sddraft in the key '&lt;STRONG&gt;TileCacheSchemaFile&lt;/STRONG&gt;' -&amp;gt; {path/to/schema} without any changes to the error message.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;q1:&lt;/STRONG&gt; How do I go about doing this task without the error? I can't seem to find the right documentation about this on the esri platform&lt;/P&gt;&lt;P&gt;It seems the analyzer finds the cache folder but doen't link the scheme like it does in Pro. Am I missing a key in the sddraft to allow it to change the scheme if it finds one?&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;q2:&lt;/STRONG&gt; How is the error not findable with a google search?&lt;/P&gt;&lt;P&gt;I'm aware that sddrafts comming from ArcGIS Pro are quite different from sddrafts made with arcpy.&lt;/P&gt;&lt;P&gt;Thanks for reading, anything helps at this point hahaha&lt;/P&gt;</description>
      <pubDate>Fri, 02 Jun 2023 12:11:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/linking-pre-calculated-cache-to-sddraft-to-a/m-p/1295312#M67778</guid>
      <dc:creator>NicolasRojas</dc:creator>
      <dc:date>2023-06-02T12:11:31Z</dc:date>
    </item>
  </channel>
</rss>

