DistributedCacheExtensions.SetStringAsync 메서드

정의

오버로드

SetStringAsync(IDistributedCache, String, String)

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions)

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

SetStringAsync(IDistributedCache, String, String, CancellationToken)

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken)

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

SetStringAsync(IDistributedCache, String, String)

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ SetStringAsync(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value);
public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String) As Task

매개 변수

cache
IDistributedCache

데이터를 저장할 캐시입니다.

key
String

데이터를 저장할 키입니다.

value
String

캐시에 저장할 데이터입니다.

반환

비동기 집합 작업을 나타내는 태스크입니다.

예외

key 또는 value가 null입니다.

설명

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw SetString(IDistributedCache, String, String)된 예외를 참조하세요.

적용 대상

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions)

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Threading::Tasks::Task ^ SetStringAsync(Microsoft::Extensions::Caching::Distributed::IDistributedCache ^ cache, System::String ^ key, System::String ^ value, Microsoft::Extensions::Caching::Distributed::DistributedCacheEntryOptions ^ options);
public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions) As Task

매개 변수

cache
IDistributedCache

데이터를 저장할 캐시입니다.

key
String

데이터를 저장할 키입니다.

value
String

캐시에 저장할 데이터입니다.

options
DistributedCacheEntryOptions

항목에 대한 캐시 옵션입니다.

반환

비동기 집합 작업을 나타내는 태스크입니다.

예외

key 또는 value가 null입니다.

설명

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)된 예외를 참조하세요.

적용 대상

SetStringAsync(IDistributedCache, String, String, CancellationToken)

Source:
DistributedCacheExtensions.cs
Source:
DistributedCacheExtensions.cs
Source:
DistributedCacheExtensions.cs

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, System.Threading.CancellationToken token = default);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String, Optional token As CancellationToken = Nothing) As Task

매개 변수

cache
IDistributedCache

데이터를 저장할 캐시입니다.

key
String

데이터를 저장할 키입니다.

value
String

캐시에 저장할 데이터입니다.

token
CancellationToken

선택 사항입니다. 작업을 취소하는 CancellationToken입니다.

반환

비동기 집합 작업을 나타내는 태스크입니다.

예외

key 또는 value가 null입니다.

취소 토큰이 취소되었습니다. 이 예외는 반환된 작업에 저장됩니다.

설명

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw SetString(IDistributedCache, String, String)된 예외를 참조하세요.

적용 대상

SetStringAsync(IDistributedCache, String, String, DistributedCacheEntryOptions, CancellationToken)

Source:
DistributedCacheExtensions.cs
Source:
DistributedCacheExtensions.cs
Source:
DistributedCacheExtensions.cs

지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.

public static System.Threading.Tasks.Task SetStringAsync (this Microsoft.Extensions.Caching.Distributed.IDistributedCache cache, string key, string value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default);
static member SetStringAsync : Microsoft.Extensions.Caching.Distributed.IDistributedCache * string * string * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function SetStringAsync (cache As IDistributedCache, key As String, value As String, options As DistributedCacheEntryOptions, Optional token As CancellationToken = Nothing) As Task

매개 변수

cache
IDistributedCache

데이터를 저장할 캐시입니다.

key
String

데이터를 저장할 키입니다.

value
String

캐시에 저장할 데이터입니다.

options
DistributedCacheEntryOptions

항목에 대한 캐시 옵션입니다.

token
CancellationToken

선택 사항입니다. 작업을 취소하는 CancellationToken입니다.

반환

비동기 집합 작업을 나타내는 태스크입니다.

예외

key 또는 value가 null입니다.

취소 토큰이 취소되었습니다. 이 예외는 반환된 작업에 저장됩니다.

설명

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 태스크에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw SetString(IDistributedCache, String, String, DistributedCacheEntryOptions)된 예외를 참조하세요.

적용 대상