public async Task LockAndOperateAsync(string key, Func <Task> operateFactory, TimeSpan lockTimeSpan = default) { if (lockTimeSpan == default) { lockTimeSpan = TimeSpan.FromMilliseconds(WeChatCacheConstants.DefaultLockTimeSpan); } var lockCancellationToken = new CancellationTokenSource(lockTimeSpan).Token; await AsyncHelper.GetLockAsync(key, operateFactory, lockCancellationToken); }