public static Task Set(this IIsolatedKeyValueStore keyValueStore, Session session, string key, string value, Moment?expiresAt, CancellationToken cancellationToken = default) { var command = new IsolatedSetCommand(session, key, value, expiresAt); return(keyValueStore.Set(command, cancellationToken)); }
public virtual async Task Set(IsolatedSetCommand command, CancellationToken cancellationToken = default) { if (Computed.IsInvalidating()) { return; } var keyChecker = await GetKeyChecker(command.Session, cancellationToken).ConfigureAwait(false); var expiresAt = command.ExpiresAt; keyChecker.CheckKey(command.Key, ref expiresAt); await Store.Set(command.Key, command.Value, expiresAt, cancellationToken).ConfigureAwait(false); }
public Task Set([FromBody] IsolatedSetCommand command, CancellationToken cancellationToken = default) { command.UseDefaultSession(SessionResolver); return(Store.Set(command, cancellationToken)); }