3

コマンド ラインまたは Powershell スクリプトから ARR キャッシュ内のキャッシュされたすべてのオブジェクトを削除するスレッドに基づくいくつかの PowerShell があります。

       try{
            $url = $file.get($i)

            $m =( new-object Microsoft.Web.Administration.ServerManager )
            $x = $m.GetApplicationHostConfiguration().GetSection("system.webServer/diskCache");
            $method = $x.Methods["FlushUrl"].CreateInstance()
            $method.Input.SetAttributeValue("url", $url)
            $method.Execute();
            $evt.WriteEntry("$ScriptName Cache item $file($i) flushed on $env:computername "  ,$infoevent,3)
        }catch{
            $detail = $_.Exception.ErrorRecord.ToString()
            $evt.WriteEntry("$ScriptName Error flushing cache item $file($i) on $env:computername : $detail"   ,$errevent,4)
        }

$url はファイルから読み込まれます。私の知る限り、これにhttp://example.comの形式でURLを与えることになっています

これにより、ARR IIS アプリケーションおよびルーティング キャッシュ フォルダーから full.gzip を含むいくつかのキャッシュ アイテムがクリアされると予想されますが、この full.gzip は残ります。

私は、これがどのように機能するのか間違っているか、API が信頼できないかのどちらかです。

Win2012 IIS 8.0

4

0 に答える 0