IBufferDistributedCache.SetAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Asynchronously sets or overwrites a cache entry.
public System.Threading.Tasks.ValueTask SetAsync (string key, System.Buffers.ReadOnlySequence<byte> value, Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions options, System.Threading.CancellationToken token = default);
abstract member SetAsync : string * System.Buffers.ReadOnlySequence<byte> * Microsoft.Extensions.Caching.Distributed.DistributedCacheEntryOptions * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask
Public Function SetAsync (key As String, value As ReadOnlySequence(Of Byte), options As DistributedCacheEntryOptions, Optional token As CancellationToken = Nothing) As ValueTask
Parameters
- key
- String
The key of the entry to create.
- value
- ReadOnlySequence<Byte>
The value for this cache entry.
- options
- DistributedCacheEntryOptions
The cache options for the value.
- token
- CancellationToken
The CancellationToken used to propagate notifications that the operation should be canceled.
Returns
Remarks
This method is functionally similar to SetAsync(String, Byte[], DistributedCacheEntryOptions, CancellationToken), but avoids the array allocation.
Applies to
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
.NET