去掉内存缓存
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
f9bf9d752c
commit
7dcf73176c
|
@ -160,7 +160,7 @@ builder.Services.AddSignalR();
|
|||
|
||||
builder.Services.AddSingleton<IUserIdProvider, IRaCISUserIdProvider>();
|
||||
|
||||
builder.Services.AddMemoryCache();
|
||||
//builder.Services.AddMemoryCache();
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ using Microsoft.Identity.Client;
|
|||
using static IRaCIS.Core.Domain.Share.StaticData;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Medallion.Threading;
|
||||
using EasyCaching.Core;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
@ -25,7 +26,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<UserLog> _userLogRepository;
|
||||
|
||||
private readonly IDistributedLockProvider _distributedLockProvider;
|
||||
private readonly IMemoryCache _cache;
|
||||
private readonly IEasyCachingProvider _cache;
|
||||
|
||||
private readonly IOptionsMonitor<ServiceVerifyConfigOption> _verifyConfig;
|
||||
|
||||
|
@ -34,7 +35,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
IMailVerificationService mailVerificationService,
|
||||
IRepository<VerificationCode> verificationCodeRepository,
|
||||
IMemoryCache cache,
|
||||
IEasyCachingProvider cache,
|
||||
IRepository<TrialUser> userTrialRepository,
|
||||
IOptionsMonitor<ServiceVerifyConfigOption> verifyConfig,
|
||||
IRepository<UserLog> userLogRepository
|
||||
|
@ -629,7 +630,7 @@ namespace IRaCIS.Application.Services
|
|||
string cacheKey = $"{cachePrefix}{userName}";
|
||||
|
||||
// 从缓存中获取登录失败次数
|
||||
int? failCount = _cache.Get<int?>(cacheKey);
|
||||
int? failCount = _cache.Get<int?>(cacheKey).Value;
|
||||
|
||||
if (failCount == null)
|
||||
{
|
||||
|
|
|
@ -89,7 +89,6 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<User> userRepository,
|
||||
IEasyCachingProvider provider,
|
||||
IRepository<ReadingCustomTag> readingCustomTagRepository,
|
||||
IMemoryCache cache,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
IRepository<TumorAssessment_RECIST1Point1> tumorAssessmentRepository,
|
||||
|
|
Loading…
Reference in New Issue