VirtualPathProvider.GetCacheKey(String) 方法

定義

傳回用於指定虛擬路徑的快取索引鍵。

public:
 virtual System::String ^ GetCacheKey(System::String ^ virtualPath);
public virtual string GetCacheKey (string virtualPath);
abstract member GetCacheKey : string -> string
override this.GetCacheKey : string -> string
Public Overridable Function GetCacheKey (virtualPath As String) As String

參數

virtualPath
String

虛擬資源的路徑。

傳回

String

指定虛擬資源的快取索引鍵。

備註

GetCacheKey使用 方法來提供虛擬資源的自訂快取金鑰。 如果您未覆寫 GetCacheKey 方法,則會將虛擬路徑用於快取索引鍵。

給繼承者的注意事項

只有在根據虛擬路徑建立快取金鑰時,才覆寫預設 GetCacheKey(String) 方法,不適用於您的應用程式。

適用於