MemoryCache.GetValues(IEnumerable<String>, String) 方法

定義

傳回對應至指定之索引鍵的一組快取項目。

public override System.Collections.Generic.IDictionary<string,object> GetValues (System.Collections.Generic.IEnumerable<string> keys, string regionName = default);
override this.GetValues : seq<string> * string -> System.Collections.Generic.IDictionary<string, obj>
Public Overrides Function GetValues (keys As IEnumerable(Of String), Optional regionName As String = Nothing) As IDictionary(Of String, Object)

參數

keys
IEnumerable<String>

要傳回之快取項目的一組唯一識別項。

regionName
String

快取區中的具名區域,已將快取項目加入其中。 請勿傳遞這個參數的值。 這個參數預設為 null,因為 MemoryCache 類別沒有實作區域。

傳回

對應至指定之索引鍵的一組快取項目。

例外狀況

regionName 不是 null

keysnull

集合中的個別索引鍵是 null

備註

如果所 keys 代表的快取專案不存在,字典中傳回物件的對應值會設定為 null。 因此,傳回的字典一律具有與 中 keys項目數相同的項目數目。

適用於