DistributedCacheExtensions.SetStringAsync 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
오버로드
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)
지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.
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)
지정된 키로 지정된 캐시에서 문자열을 비동기적으로 설정합니다.
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)된 예외를 참조하세요.
적용 대상
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기