MemoryCache.GetValues(IEnumerable<String>, String) 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一组对应于指定键的缓存条目。
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。
keys 是 null。
集合中的单个键是 null。
注解
如果不存在由该对象表示 keys 的缓存项,则字典中返回对象的相应值设置为 null。 因此,返回的字典始终具有与元素 keys数相同的项数。