dotnet / dotnet/dotnet-api-docs

Behavior of MemoryCache.GetValues did not match with dotnet API doc

Aperta
#4,150 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
area-System.Memory Pri3 untriaged
Lingua principale
C#
Stelle
950
Fork
1.7k
Merge medio
2g 19h
PR unite (30g)
52

Descrizione

From the dotnet [API doc](https://docs.microsoft.com/en-us/dotnet/api/system.runtime.caching.memorycache.getvalues?view=netframework-4.8), the behavior of MemoryCache.GetValues should be:

> 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.

However the actual behavior is that only those key value pairs stored in MemoryCache are returned.

![image](https://user-images.githubusercontent.com/61817681/79989991-169c3500-84e3-11ea-8bde-2869ed88c322.png)

I test the behavior with System.Runtime.Caching 4.7.0 in dotnet core, but the problem should exist for all versions.

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia confrontando la documentazione dell'API .NET collegata con il comportamento osservato di System.Runtime.Caching 4.7.0 per MemoryCache.GetValues. Determina se fa fede la documentazione o l'implementazione, quindi aggiorna la documentazione dell'API oppure registra il comportamento chiarito; il lavoro è completato quando il comportamento documentato corrisponde al risultato verificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
csharp
Ambito
documentation
Tipo di issue
Documentazione
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.