<?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 Turn off cache? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/turn-off-cache/m-p/623275#M16761</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;Hi, we've got an in-house gis server.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;I bring in a layer but can't see it in Arcmap.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;When I go into the table of contents and uncheck "Enable Cache View Mode" then I can see it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;I suppose I have to either do something to set up the cache, or else disable the cache view mode.&amp;nbsp; I would like to do that programmatically.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;This doesn't seem to work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Dim&lt;/SPAN&gt; pEnumLayer &lt;SPAN style="color: #0000ff;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af;"&gt;IEnumLayer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;pEnumLayer = cmap.Layers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;pEnumLayer.Reset()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Dim&lt;/SPAN&gt; player &lt;SPAN style="color: #0000ff;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af;"&gt;ILayer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&amp;nbsp; player = pEnumLayer.Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Do&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;While&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Not&lt;/SPAN&gt; player &lt;SPAN style="color: #0000ff;"&gt;Is&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Nothing&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; player.cached = false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; Msgbox(str(player.cached))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; 'for some reason this is returning "4"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; player = pEnumLayer.Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;Loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;When this code is run the layer remains with "Enable Cache View Mode" checked.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 05 Oct 2015 20:15:34 GMT</pubDate>
    <dc:creator>JoeMcCollum</dc:creator>
    <dc:date>2015-10-05T20:15:34Z</dc:date>
    <item>
      <title>Turn off cache?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/turn-off-cache/m-p/623275#M16761</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;Hi, we've got an in-house gis server.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;I bring in a layer but can't see it in Arcmap.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;When I go into the table of contents and uncheck "Enable Cache View Mode" then I can see it.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;I suppose I have to either do something to set up the cache, or else disable the cache view mode.&amp;nbsp; I would like to do that programmatically.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;This doesn't seem to work:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Dim&lt;/SPAN&gt; pEnumLayer &lt;SPAN style="color: #0000ff;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af;"&gt;IEnumLayer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;pEnumLayer = cmap.Layers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;pEnumLayer.Reset()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Dim&lt;/SPAN&gt; player &lt;SPAN style="color: #0000ff;"&gt;As&lt;/SPAN&gt; &lt;SPAN style="color: #2b91af;"&gt;ILayer&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&amp;nbsp; player = pEnumLayer.Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;Do&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;While&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Not&lt;/SPAN&gt; player &lt;SPAN style="color: #0000ff;"&gt;Is&lt;/SPAN&gt; &lt;SPAN style="color: #0000ff;"&gt;Nothing&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; player.cached = false&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; Msgbox(str(player.cached))&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; 'for some reason this is returning "4"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;&amp;nbsp;&amp;nbsp; player = pEnumLayer.Next&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 10pt; font-family: times new roman,times;"&gt;Loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: times new roman,times; font-size: 10pt;"&gt;&lt;SPAN style="color: #0000ff;"&gt;When this code is run the layer remains with "Enable Cache View Mode" checked.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 05 Oct 2015 20:15:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/turn-off-cache/m-p/623275#M16761</guid>
      <dc:creator>JoeMcCollum</dc:creator>
      <dc:date>2015-10-05T20:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: Turn off cache?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/turn-off-cache/m-p/623276#M16762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="text-align: left;"&gt;Hi &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;You did not write it but I understand it is image service (this is the service that has this button).&lt;/P&gt;&lt;P style="text-align: left;"&gt;If it is unable by default it means you define the cache but did not build it.&lt;/P&gt;&lt;P style="text-align: left;"&gt;Building the cache can take time, use the Manage Map Server Cache Tiles GP tools to build it.&lt;/P&gt;&lt;P style="text-align: left;"&gt;You can republish the service without cache definition so it will not use it by default.&lt;/P&gt;&lt;P style="text-align: left;"&gt;The way to do it using code in your situation is IImageServerLayer3.EnableCacheViewMode&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="text-align: left;"&gt;Have fun&lt;/P&gt;&lt;P style="text-align: left;"&gt;Mody&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Oct 2015 05:15:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/turn-off-cache/m-p/623276#M16762</guid>
      <dc:creator>ModyBuchbinder</dc:creator>
      <dc:date>2015-10-06T05:15:43Z</dc:date>
    </item>
  </channel>
</rss>

