Method PurgeAsync
- Namespace
- NATS.Client.KeyValueStore
- Assembly
- NATS.Client.KeyValueStore.dll
PurgeAsync(string, NatsKVDeleteOpts?, CancellationToken)
Purge an entry from the bucket
ValueTask PurgeAsync(string key, NatsKVDeleteOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
keystringKey of the entry
optsNatsKVDeleteOptsDelete options
cancellationTokenCancellationTokenA CancellationToken used to cancel the API call.
Returns
PurgeAsync(string, TimeSpan, NatsKVDeleteOpts?, CancellationToken)
Purge an entry from the bucket
ValueTask PurgeAsync(string key, TimeSpan ttl, NatsKVDeleteOpts? opts = null, CancellationToken cancellationToken = default)
Parameters
keystringKey of the entry
ttlTimeSpanTime to live for the purge marker (requires the LimitMarkerTTL to be set to true). For a key that should never expire, use the MaxValue constant. This feature is only available on NATS server v2.11 and later.
optsNatsKVDeleteOptsDelete options
cancellationTokenCancellationTokenA CancellationToken used to cancel the API call.