Open
Description
Documentation for MemoryCache.GetValues(IEnumerable, String) Method specifies that:
Returns
IDictionary<String,Object>
A set of cache entries that correspond to the specified keys.Remarks
If a cache entry that is represented by the keys does not exist, the corresponding value for the returned object in the dictionary is set to null. Therefore, the returned dictionary always has the same number of items as the number of elements in keys.
GetValues implementation is different.
-
First,
null
entries corresponding tokeys
that do not exist are not added. -
Second, if none of the
keys
are found, then method returnsnull
instead ofIDictionary<String,Object>
.
We need to either update documentation or patch the implementation.