public Xp(IHttpClientFactory http, RokiContext context, IRedisCache cache, IConfigurationService config) { _http = http; _context = context; _config = config; _cache = cache.Redis.GetDatabase(); }
public ShowdownCommands(ICurrencyService currency, DiscordSocketClient client, IRedisCache cache, IConfigurationService config) { _currency = currency; _client = client; _cache = cache; _config = config; }
public UserController(IRedisCache redisCache, IObjectMapper objectMapper, IUnitWork unitWork, IMemoryCache cache, IUserFileService userFileService, AuthrizeValidator authrize, ILogger <UserController> logger) : base(redisCache, unitWork, cache, authrize, logger) { base.ObjectMapper = objectMapper; this._userFileService = userFileService; base.IsCustomValidator = true; base.PageName = "user"; }
public RouletteController(IRoulette _Roullete, IRedisCache _IRedisCache, IConfiguration _IConfiguration) { _Roulette = _Roullete; _RedisCache = _IRedisCache; _Configuration = _IConfiguration; _ExpirationTime = TimeSpan.FromSeconds(Convert.ToInt32(_Configuration["RedisConfig:ExpirationTime"])); }
public CommonService(IRepository <TcGroups> groupRepository, IRedisCache redisCache, ILoggerFactory loggerFactory) { this.groupRepository = groupRepository; this.redisCache = redisCache; this.logger = loggerFactory.CreateLogger <CommonService>(); }
public BaseController(IRedisCache redisCache, IUnitWork unitWork, IMemoryCache cache, ILogger <BaseController <T, F, G> > logger) { this.RedisCache = redisCache; this.UnitWork = unitWork; this.Cache = cache; this.Logger = logger; }
public AccountService(ILogger logger, ICAPPublisher publisher, IConfiguration configuraton, IRedisCache cache) { _logger = logger; _configuation = configuraton; _cache = cache; _publisher = publisher; }
/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="cache"></param> /// <param name="key"></param> /// <param name="field"></param> /// <param name="value"></param> /// <param name="absoluteExpirationRelativeToNow"></param> /// <returns></returns> public static bool HSet <T>(this IRedisCache cache, string key, string field, T value, TimeSpan absoluteExpirationRelativeToNow) { return(cache.HSet(key, field, value, new CacheItemOptions { AbsoluteExpirationRelativeToNow = absoluteExpirationRelativeToNow })); }
/// <summary> /// 滑动过期设置 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="cache"></param> /// <param name="key"></param> /// <param name="field"></param> /// <param name="value"></param> /// <param name="slidingExpirationSec"></param> /// <returns></returns> public static bool HSet <T>(this IRedisCache cache, string key, string field, T value, int slidingExpirationSec) { return(cache.HSet(key, field, value, new CacheItemOptions { SlidingExpiration = new TimeSpan(0, 0, slidingExpirationSec) }));; }
public DenormalizerHandler() { _geoCodingService = new ReverseGeoCodingService(); _dbContextScopeFactory = DependencyRegistrar.ResolveDbContextScopeFactory(); _streamLock = new ConcurrentDictionary <String, Semaphore>(); _redisCache = DependencyRegistrar.ResolveRedisCache(); }
public static bool RefreshConfigurationFromCache(this IRedisCache cache, IApplicationSecrets secrets, IConfigurationRoot configuration) { if (!Initialized) { // Get the information about what cache values we need refreshed into configuration IApplicationSecretsConnectionStrings TimedCacheRefresh = secrets.Secret("TimedCacheRefresh"); if (TimedCacheRefresh != null) { // Use the "TimedCacheRefresh" secret to get the list of cache keys that need to be auto-refreshed // and placed into the contiguration. This allows the application to read cache values just like // regular configuration settings in "appsettings.json". The "Value" for this secret contains // an array of cache keys that must be refreshed periodically. string[] keys = TimedCacheRefresh.Value.Split(','); // The MetadataProperties "RefreshPeriodMinutes" contains the refresh period for the cache keys string RefreshPeriodMinutes = TimedCacheRefresh["RefreshPeriodMinutes"]; if (!string.IsNullOrWhiteSpace(RefreshPeriodMinutes)) { int minutes = int.Parse(RefreshPeriodMinutes); // Start the thread that will read the cache every N minutes Task task = new Task(() => LaunchTimedRefresh(cache, keys, minutes, configuration)); task.Start(); // Wait for the thread to read all cache keys for the first time before continuing waitForCompletion.WaitOne(); Initialized = true; } } } return(Initialized); }
public RedisProjectionWriter(IRedisCache cache, ILogger <RedisProjectionWriter <TView> > logger, IEventSerializer eventSerializer, IEventDeserializer eventDeserializer) { if (cache == null) { throw new ArgumentNullException(nameof(cache)); } if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (eventSerializer == null) { throw new ArgumentNullException(nameof(eventSerializer)); } if (eventDeserializer == null) { throw new ArgumentNullException(nameof(eventDeserializer)); } _cache = cache; _logger = logger; _eventSerializer = eventSerializer; _keyPrefix = typeof(TView).Name; }
public TablesController(ISchoolPerformanceRepository <SchoolResult> result, IRedisCache cache, ILogger <TablesController> logger) { _result = result; _cache = cache; _logger = logger; }
public DoPageLoadHandler( IMediator mediator, IRedisCache cache) { _mediator = mediator; _cache = cache; }
public PassportClient(AppSettings appSettings, IRedisCache redisCache, HttpClient httpClient, IAuthorizeTokenClient authorizeTokenClient, SmsOptions smsServerOptions) : base(httpClient) { _appSettings = appSettings; _redisCache = redisCache; _authorizeTokenClient = authorizeTokenClient; _smsServerOptions = smsServerOptions; }
public UsersSecretsApplication( IUsersSecretsDomain services, ITokens tokens, ISettingsUserSecrests settings, ISocial social, IRedisCache redisCache, ICryptograhic crypto, IResult result, IErrorMessages errors, ISettingsTokens settingsTokens, ISettingsUserSecrests settingsSecrets, IUserInfo userInfo ) { _services = services; _tokens = tokens; _settings = settings; _social = social; _redisCache = redisCache; _crypto = crypto; _result = result; _errors = errors; _settingsSecrets = settingsSecrets; _settingsTokens = settingsTokens; _userInfo = userInfo; }
public RedisCacheIpPolicyStore( IRedisCache cache, IRateLimitLoader Loader) : base(cache) { _options = Loader.GetIpRateLimitOptions(); _policies = Loader.GetIpRateLimitPolicies(); }
public Core(IRedisCache redisCache, AppSessionFactory appSessionFactory, IMemoryCache cache, ILogger <Core> logger) { this._redisCache = redisCache; this._logger = logger; this._cache = cache; this._appSessionFactory = appSessionFactory; }
/// <summary> /// 绝对过期设置 /// </summary> /// <typeparam name="T"></typeparam> /// <param name="cache"></param> /// <param name="key"></param> /// <param name="field"></param> /// <param name="value"></param> /// <param name="absoluteExpiration"></param> /// <returns></returns> public static bool HSet <T>(this IRedisCache cache, string key, string field, T value, DateTimeOffset absoluteExpiration) { return(cache.HSet(key, field, value, new CacheItemOptions { AbsoluteExpiration = absoluteExpiration })); }
public CustomTokenRefreshService(IServiceFinder <ConsulService> serviceFinder, ILoadBalancer loadBalancer, IRedisCache cache, OcelotConfiguration options, IConfiguration configuration) { _serviceFinder = serviceFinder; _loadBalancer = loadBalancer ?? new WeightRoundBalancer(); _options = options; _cache = cache; _conf = configuration; }
public CacheService() { var cacheEndpoint = ConfigurationManager.AppSettings["CacheEndpoint"]; var cachePassword = ConfigurationManager.AppSettings["CachePassword"]; var cacheRetry = 3;// 5; _cache = new RedisCache(cacheEndpoint, cachePassword, cacheRetry); }
public RedisCachingProvider( ILogger <RedisCachingProvider> logger, IRedisCache cache ) { _logger = logger; _cache = cache; }
public TeltonikaTcpServer( IBusControl bus, IRedisCache redisCache, ILogger log) { _bus = bus; _redisCache = redisCache; _log = log; }
public AutoCompleteService(ISchoolPerformanceRepository <SchoolResult> result, IRedisCache cache, ILogger <AutoCompleteService> logger) { _result = result; _schools = new List <AutocompleteViewModel>(); _cache = cache; _logger = logger; }
public InvestimentoController(IInvestimentoService investimentoService, IRedisCache redisCache, IDistributedCache cache) { _investimentoService = investimentoService; _redisCache = redisCache; _cache = cache; }
public ComplexCache(IMemoryCache memoryCache, IRedisCache redisCache) { memoryCache.EnsureNotNull(() => new AngleExceptions()); redisCache.EnsureNotNull(() => new AngleExceptions()); _memoryCache = memoryCache; _redisCache = redisCache; }
public UserManagerService(IUserRepository userRepository, IRoleRepository roleRepository, IMapper mapper, IRedisCache redisCache, ILoggerFactory loggerFactory) { _userRepository = userRepository; _roleRepository = roleRepository; _unitOfWork = new SEUnitOfWork(); _mapper = mapper; _redisCache = redisCache; _logger = loggerFactory.CreateLogger(nameof(UserManagerService)); }
private RedisInstance(IAzure azure, string resourceId, IRedisCache redisCache, RedisClusterSize clusterSize) { Contract.RequiresNotNullOrEmpty(resourceId); _azure = azure; _resourceId = resourceId; RedisCache = redisCache; ClusterSize = clusterSize; }
/// <summary> /// /// </summary> public UserService(IRedisCache redisCache, IUserRepository userRepository, IUnitOfWork unitOfWork, IEncryptService encryptService, IExternalClient externalClient, IOperatorLogRepository operatorLogRepository) { _redisCache = redisCache; _userRepository = userRepository; _unitOfWork = unitOfWork; _encryptService = encryptService; _externalClient = externalClient; _operatorLogRepository = operatorLogRepository; }
public static void HashGetAllTest(IRedisCache redisCache) { var resList = redisCache.HGetAll <string>("TestHashID"); foreach (var item in resList) { Debug.WriteLine(item); } }
public void CacheTest2() { Resolver.Configure(Path.Combine(AppDomain.CurrentDomain.BaseDirectory,"config/unity.config")); _cache = Resolver.Current.Resolve<IRedisCache>(); }
public TestController(ILogger log,IRedisCache cache) { _log = log; _cache = cache; }