public Task RefreshAsync(string key, CancellationToken token = default(CancellationToken)) { if (DisableRefreshAsync) { throw new InvalidOperationException(); } return(_cache.RefreshAsync(key)); }
public Task RefreshAsync(string key) { if (DisableRefreshAsync) { throw new InvalidOperationException(); } return(_cache.RefreshAsync(key)); }
public Task RefreshAsync(string key, CancellationToken token = default) { if (DisableRefreshAsync) { throw new InvalidOperationException(); } if (DelayRefreshAsync) { token.WaitHandle.WaitOne(TimeSpan.FromSeconds(10)); token.ThrowIfCancellationRequested(); } return(_cache.RefreshAsync(key)); }