Cache.Get(String) 方法

定义

Cache 对象检索指定项。Retrieves the specified item from the Cache object.

public:
 System::Object ^ Get(System::String ^ key);
public object Get (string key);
member this.Get : string -> obj
Public Function Get (key As String) As Object

参数

key
String

要检索的缓存项的标识符。The identifier for the cache item to retrieve.

返回

检索到的缓存项,未找到该键时为 nullThe retrieved cache item, or null if the key is not found.

示例

下面的示例演示如何检索为 ASP.NET 文本框服务器控件缓存的值。The following example demonstrates how to retrieve the value cached for an ASP.NET text box server control.

Cache.Get("MyTextBox.Value");
   
Cache.Get("MyTextBox.Value")

适用于

另请参阅