HybridCache.SetAsync<T> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Définit ou remplace de façon asynchrone la valeur associée à la clé.
public abstract System.Threading.Tasks.ValueTask SetAsync<T>(string key, T value, Microsoft.Extensions.Caching.Hybrid.HybridCacheEntryOptions? options = default, System.Collections.Generic.IEnumerable<string>? tags = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SetAsync : string * 'T * Microsoft.Extensions.Caching.Hybrid.HybridCacheEntryOptions * seq<string> * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public MustOverride Function SetAsync(Of T) (key As String, value As T, Optional options As HybridCacheEntryOptions = Nothing, Optional tags As IEnumerable(Of String) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As ValueTask
Paramètres de type
- T
Type des données prises en compte.
Paramètres
- key
- String
Clé de l’entrée à créer.
- value
- T
Valeur à affecter pour cette entrée de cache.
- options
- HybridCacheEntryOptions
Options supplémentaires pour cette entrée de cache.
- tags
- IEnumerable<String>
Balises à associer à cette entrée de cache.
- cancellationToken
- CancellationToken
CancellationToken Utilisé pour propager les notifications que l’opération doit être annulée.