グローブ サービス キャッシュの削除(Delete Globe Server Cache) (サーバ)
サマリ
既存のグローブ サービス キャッシュの 1 つまたは複数のレイヤと、キャッシュ内のすべてのタイルを削除します。
使用法
- これは回復不能な操作のため、そのキャッシュが確実に不要な場合にのみ使用してください。 
- 
このツールは、既存のグローブ サービス キャッシュの削除に使用することができます。キャッシュを削除するには、ArcGIS Server(ホスト)コンピュータを指定して、グローブ サービスを選択します。[レイヤ] リストには、選択したサービス内で利用可能なすべてのレイヤが設定されます。 
- 
デフォルトでは、サービス内のすべてのレイヤが表示され、選択されています。特定のレイヤのキャッシュのみを削除する場合には、必ず、残しておきたいキャッシュを選択解除してください。 
- 
[グローブ サービス キャッシュの削除(Delete Globe Server Cache)] ツールは、キャッシュ フォルダ全体を削除します。[グローブ サービス キャッシュの削除(Delete Globe Server Cache)] ツールを実行した後、サービスが再起動することに注意してください。そこで今度は、サービス内で各レイヤに対して、削除操作によって削除されたキャッシュの新しいセットを生成します。これは、すべてのグローブ サービスが、キャッシュ構成がディスク上に存在することを必要としているからです。サービスの開始時に自動的に作成されるキャッシュは、タイルをなにも含まないスケルトン表示です。 
 レガシー:
レガシー:構文
| パラメータ | 説明 | データ タイプ | 
| service | レイヤ キャッシュを削除するグローブ サービス。 これは、サーバとサービスの両方の情報を含む文字列です。この文字列の構築方法を確認するには、ArcCatalog を開き、カタログ ツリーでサービスを選択して、[場所] ツールバーに表示されているテキストを記録します。バックスラッシュをスラッシュに変更します(たとえば、GIS Servers/arcgis on MYSERVER (admin)/Seattle.GlobeServer)。 | String | 
| Layer | キャッシュが削除されるグローブ サービスのレイヤ。デフォルトでは、サービスの全レイヤが含まれます。レイヤを除外すると、そのレイヤのキャッシュは削除されません。 | String | 
コードのサンプル
この例では、グローブ サービスのキャッシュの全レイヤを削除します。
#DeleteGlobeServerCache example For ArcGIS Server 10.1 Beta(stand-alone script)
# Name: DeleteGlobeServerCache.py
# Description: The following stand-alone script deletes globe server cache
# Requirements: os, sys, time & traceback modules
# Author: ESRI
# Any line that begins with a pound sign is a comment and will not be executed
# Empty quotes take the default value.
# To accept arguments from the command line replace values of variables to
#                                                           "sys.argv[]"
# Import system modules
import arcpy
from arcpy import env
import os, sys, time, datetime, traceback, string
# Set environment settings
env.workspace = "C:/data"
# List of input variables for map service properties
connectionFile = r"C:\Users\<username>\AppData\Roaming\ESRI\Desktop10.1\ArcCatalog"
server = "arcgis on MyServer_6080 (publisher)"
globeServiceName = "tstGlobeService.GlobeService"
globeService = connectionFile + "\\" + server + "\\" + globeServiceName
inputLayers = ""
currentTime = datetime.datetime.now()
arg1 = currentTime.strftime("%H-%M")
arg2 = currentTime.strftime("%Y-%m-%d %H:%M")
file = 'C:/data/report_%s.txt' % arg1
# print results of the script to a report
report = open(file,'w')
try:
    starttime = time.clock()
    result = arcpy.DeleteGlobeServerCache_server(globeService, inputLayers)
    finishtime = time.clock()
    elapsedtime = finishtime - starttime
    #print messages to a file
    while result.status < 4:
        time.sleep(0.2)
    resultValue = result.getMessages()
    report.write ("completed " + str(resultValue))
    print "Deleted the GlobeServer cache successfully for globeservice "
    globeServiceName + "\n in " + str(elapsedtime) + " sec \n on " + arg2
except Exception, e:
    # If an error occurred, print line number and error message
    tb = sys.exc_info()[2]
    report.write("Failed at \n" "Line %i" % tb.tb_lineno)
    report.write(e.message)
report.close()
    
print "Deleted the globe server cache successfully"