Documentation
Table of Contents

Method TryTakeRecompileAsync

Namespace
IntentSharp.Mapping
Assembly
IntentSharp.dll

TryTakeRecompileAsync(string, string, int, TimeSpan, CancellationToken)

The persisted per-key cap on replacements, shared by every process on the store: takes one of limit slots in the current window of length window, which starts at the first slot taken after the previous window ended. Returns true when a slot was taken, false when the window's slots are used up or limit is 0 or less.

Task<bool> TryTakeRecompileAsync(string @namespace, string key, int limit, TimeSpan window, CancellationToken cancellationToken = default)

Parameters

namespace string

The namespace.

key string

The mapping key.

limit int

The slots per window.

window TimeSpan

The length of a window; greater than zero.

cancellationToken CancellationToken

Cancels the write.

Returns

Task<bool>