MemoryCache.Get(String, String) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從快取傳回專案。
public override object Get(string key, string regionName = default);
override this.Get : string * string -> obj
Public Overrides Function Get (key As String, Optional regionName As String = Nothing) As Object
參數
- key
- String
快取項目要取得的唯一識別碼。
- regionName
- String
快取中被新增快取條目的命名區域。 不要傳遞該參數的值。 這個參數是 null 預設的,因為該 MemoryCache 類別不實作區域。
傳回
對快取條目的參考,若該條目存在,則以 key為識別;否則,為 null。
例外狀況
regionName 不是 null。
key 是 null。