当前位置: 首页>>代码示例>>C#>>正文


C# ICacheClient类代码示例

本文整理汇总了C#中ICacheClient的典型用法代码示例。如果您正苦于以下问题:C# ICacheClient类的具体用法?C# ICacheClient怎么用?C# ICacheClient使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ICacheClient类属于命名空间,在下文中一共展示了ICacheClient类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DacheMvcChildActionCache

        /// <summary>
        /// The constructor.
        /// </summary>
        /// <param name="cacheClient">The cache client.</param>
        public DacheMvcChildActionCache(ICacheClient cacheClient)
            : base("Dache MVC Child Action Cache")
        {
            // Sanitize
            if (cacheClient == null)
            {
                throw new ArgumentNullException("cacheClient");
            }

            _cacheClient = cacheClient;
        }
开发者ID:najlepejsi,项目名称:dache,代码行数:15,代码来源:DacheMvcChildActionCache.cs

示例2: SessionPlugin

 public SessionPlugin(ICacheClient cacheClient, IEventRepository eventRepository, AssignToStackAction assignToStack, UpdateStatsAction updateStats, LocationPlugin locationPlugin, ILoggerFactory loggerFactory = null) : base(loggerFactory) {
     _cacheClient = new ScopedCacheClient(cacheClient, "session");
     _eventRepository = eventRepository;
     _assignToStack = assignToStack;
     _updateStats = updateStats;
     _locationPlugin = locationPlugin;
 }
开发者ID:yonglehou,项目名称:Exceptionless,代码行数:7,代码来源:70_SessionPlugin.cs

示例3: SetLocationFromGeoWorkItemHandler

 public SetLocationFromGeoWorkItemHandler(ICacheClient cacheClient, IEventRepository eventRepository, IGeocodeService geocodeService, IMetricsClient metricsClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) {
     _cacheClient = new ScopedCacheClient(cacheClient, "geo");
     _eventRepository = eventRepository;
     _geocodeService = geocodeService;
     _metricsClient = metricsClient;
     _lockProvider = new CacheLockProvider(cacheClient, messageBus);
 }
开发者ID:yonglehou,项目名称:Exceptionless,代码行数:7,代码来源:SetLocationFromGeoWorkItemHandler.cs

示例4: StatsController

 public StatsController(ErrorStatsHelper statsHelper, IOrganizationRepository organizationRepository, IErrorStackRepository errorStackRepository, IProjectRepository projectRepository, ICacheClient cacheClient) {
     _cacheClient = cacheClient;
     _statsHelper = statsHelper;
     _organizationRepository = organizationRepository;
     _errorStackRepository = errorStackRepository;
     _projectRepository = projectRepository;
 }
开发者ID:raulhmacias,项目名称:Exceptionless,代码行数:7,代码来源:StatsController.cs

示例5: ThrottleBotsPlugin

 public ThrottleBotsPlugin(ICacheClient cacheClient, IEventRepository eventRepository, IProjectRepository projectRepository, IMetricsClient metricsClient, IQueue<WorkItemData> workItemQueue) {
     _cacheClient = cacheClient;
     _metricsClient = metricsClient;
     _eventRepository = eventRepository;
     _projectRepository = projectRepository;
     _workItemQueue = workItemQueue;
 }
开发者ID:Winterleaf,项目名称:Exceptionless,代码行数:7,代码来源:0_ThrottleBotsPlugin.cs

示例6: AccountController

 public AccountController(IDbConnection db, IMetricTracker metrics, ICacheClient cache, IMailController mailController, IUserService userService, IUserAuthenticationService authenticationService)
     : base(db, metrics, cache)
 {
     _mailController = mailController;
     _userService = userService;
     _authenticationService = authenticationService;
 }
开发者ID:pleepleus88,项目名称:MvcKickstart,代码行数:7,代码来源:AccountController.cs

示例7: SystemHealthChecker

 public SystemHealthChecker(ICacheClient cacheClient, IElasticClient elasticClient, IFileStorage storage, IQueue<StatusMessage> queue, IMessageBus messageBus) {
     _cacheClient = cacheClient;
     _elasticClient = elasticClient;
     _storage = storage;
     _queue = queue;
     _messageBus = messageBus;
 }
开发者ID:Winterleaf,项目名称:Exceptionless,代码行数:7,代码来源:SystemHealthChecker.cs

示例8: ThrottlingHandler

 public ThrottlingHandler(ICacheClient cacheClient, IMetricsClient metricsClient, Func<string, long> maxRequestsForUserIdentifier, TimeSpan period, string message = "The allowed number of requests has been exceeded.") {
     _cacheClient = cacheClient;
     _metricsClient = metricsClient;
     _maxRequestsForUserIdentifier = maxRequestsForUserIdentifier;
     _period = period;
     _message = message;
 }
开发者ID:yonglehou,项目名称:Exceptionless,代码行数:7,代码来源:ThrottlingHandler.cs

示例9: AutoSessionPlugin

 public AutoSessionPlugin(ICacheClient cacheClient, IEventRepository eventRepository, AssignToStackAction assignToStack, UpdateStatsAction updateStats, LocationPlugin locationPlugin) {
     _cacheClient = new ScopedCacheClient(cacheClient, "session");
     _eventRepository = eventRepository;
     _assignToStack = assignToStack;
     _updateStats = updateStats;
     _locationPlugin = locationPlugin;
 }
开发者ID:jackswei,项目名称:Exceptionless,代码行数:7,代码来源:80_AutoSessionPlugin.cs

示例10: MyAppElasticConfiguration

 public MyAppElasticConfiguration(IQueue<WorkItemData> workItemQueue, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory) : base(workItemQueue, cacheClient, messageBus, loggerFactory) {
     AddIndex(Identities = new IdentityIndex(this));
     AddIndex(Employees = new EmployeeIndex(this));
     AddIndex(MonthlyEmployees = new MonthlyEmployeeIndex(this, 1));
     AddIndex(DailyLogEvents = new DailyLogEventIndex(this));
     AddIndex(MonthlyLogEvents = new MonthlyLogEventIndex(this));
     AddIndex(ParentChild = new ParentChildIndex(this));
 }
开发者ID:exceptionless,项目名称:Foundatio.Repositories,代码行数:8,代码来源:MyAppElasticConfiguration.cs

示例11: BaseController

 protected BaseController(IDbConnection db, IMetricTracker metrics, ICacheClient cache)
 {
     Db = db;
     Metrics = metrics;
     Log = LogManager.GetLogger(GetType());
     Cache = cache;
     CacheContext = new CacheContext(Cache);
 }
开发者ID:pleepleus88,项目名称:MvcKickstart,代码行数:8,代码来源:BaseController.cs

示例12: RemoveProjectWorkItemHandler

 public RemoveProjectWorkItemHandler(IProjectRepository projectRepository, IEventRepository eventRepository, IStackRepository stackRepository, ITokenRepository tokenRepository, IWebHookRepository webHookRepository, ICacheClient cacheClient, IMessageBus messageBus, ILoggerFactory loggerFactory = null) : base(loggerFactory) {
     _projectRepository = projectRepository;
     _eventRepository = eventRepository;
     _stackRepository = stackRepository;
     _tokenRepository = tokenRepository;
     _webHookRepository = webHookRepository;
     _lockProvider = new CacheLockProvider(cacheClient, messageBus);
 }
开发者ID:rpotalara,项目名称:Exceptionless,代码行数:8,代码来源:RemoveProjectWorkItemHandler.cs

示例13: CacheBucketMetricsClientBase

        public CacheBucketMetricsClientBase(ICacheClient cache, bool buffered = true, string prefix = null, ILoggerFactory loggerFactory = null) {
            _logger = loggerFactory.CreateLogger(GetType());
            _cache = cache;
            _buffered = buffered;
            _prefix = !String.IsNullOrEmpty(prefix) ? (!prefix.EndsWith(":") ? prefix + ":" : prefix) : String.Empty;

            if (buffered)
                _flushTimer = new Timer(OnMetricsTimer, null, TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(2));
        }
开发者ID:geffzhang,项目名称:Foundatio,代码行数:9,代码来源:CacheBucketMetricsClientBase.cs

示例14: DailySummaryJob

 public DailySummaryJob(IProjectRepository projectRepository, IOrganizationRepository organizationRepository, IUserRepository userRepository, IEventRepository eventRepository, EventStats stats, IMailer mailer, ICacheClient cacheClient, ILoggerFactory loggerFactory = null) : base(loggerFactory) {
     _projectRepository = projectRepository;
     _organizationRepository = organizationRepository;
     _userRepository = userRepository;
     _eventRepository = eventRepository;
     _stats = stats;
     _mailer = mailer;
     _lockProvider = new ThrottlingLockProvider(cacheClient, 1, TimeSpan.FromHours(1));
 }
开发者ID:rpotalara,项目名称:Exceptionless,代码行数:9,代码来源:DailySummaryJob.cs

示例15: ThrottlingLockProvider

        public ThrottlingLockProvider(ICacheClient cacheClient, int maxHitsPerPeriod = 100, TimeSpan? throttlingPeriod = null) {
            _cacheClient = cacheClient;
            _maxHitsPerPeriod = maxHitsPerPeriod;

            if (maxHitsPerPeriod <= 0)
                throw new ArgumentException("Must be a positive number.", nameof(maxHitsPerPeriod));
            
            if (throttlingPeriod.HasValue)
                _throttlingPeriod = throttlingPeriod.Value;
        }
开发者ID:jmkelly,项目名称:Foundatio,代码行数:10,代码来源:ThrottlingLockProvider.cs


注:本文中的ICacheClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。