DistributedCacheExtensions.SetString Méthode
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.
SetString(IDistributedCache, String, String) |
Définit une chaîne dans le cache spécifié avec la clé spécifiée. |
SetString(IDistributedCache, String, String, DistributedCacheEntryOptions) |
Définit une chaîne dans le cache spécifié avec la clé spécifiée. |
Définit une chaîne dans le cache spécifié avec la clé spécifiée.
public:
[System::Runtime::CompilerServices::Extension]
static void SetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value);
public static void SetString (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value);
static member SetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string -> unit
<Extension()>
Public Sub SetString (cache As IDistributedCache, key As String, value As String)
Paramètres
- cache
- IDistributedCache
Cache dans lequel stocker les données.
- key
- String
Clé dans laquelle stocker les données.
- value
- String
Données à stocker dans le cache.
Exceptions
key
ou value
est null.
S’applique à
.NET 9 et autres versions
Produit | Versions |
---|---|
.NET | 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 |
Définit une chaîne dans le cache spécifié avec la clé spécifiée.
public:
[System::Runtime::CompilerServices::Extension]
static void SetString(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public static void SetString (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
static member SetString : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> unit
<Extension()>
Public Sub SetString (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions)
Paramètres
- cache
- IDistributedCache
Cache dans lequel stocker les données.
- key
- String
Clé dans laquelle stocker les données.
- value
- String
Données à stocker dans le cache.
- options
- DistributedCacheEntryOptions
Options de cache de l’entrée.
Exceptions
key
ou value
est null.
S’applique à
.NET 9 et autres versions
Produit | Versions |
---|---|
.NET | 6, 7, 8, 9 |
.NET Framework | 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0 |
Commentaires sur .NET
.NET est un projet open source. Sélectionnez un lien pour fournir des commentaires :