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