• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ICacheClient类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: ThrottlingLockProvider

        public ThrottlingLockProvider(ICacheClient cacheClient, int maxHitsPerPeriod = 100, TimeSpan? throttlingPeriod = null, ILoggerFactory loggerFactory = null) {
            _logger = loggerFactory.CreateLogger<ThrottlingLockProvider>();
            _cacheClient = new ScopedCacheClient(cacheClient, "lock:throttled");
            _maxHitsPerPeriod = maxHitsPerPeriod;

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


示例17: CachedEventService

        public CachedEventService(TimeSpan? ttl, ICacheClient client, ICacheKeyBuilder<Guid> keyBuilder, ILogFactory factory)
        {
            if (client == null) throw new ArgumentNullException("client");
            if (keyBuilder == null) throw new ArgumentNullException("keyBuilder");
            if (factory == null) throw new ArgumentNullException("factory");

            this.ttl = ttl;
            this.client = client;
            this.factory = factory;
            this.keyBuilder = keyBuilder;
        }
开发者ID:reexjungle,项目名称:xcal,代码行数:11,代码来源:event.service.concretes.cs


示例18: StatusController

 public StatusController(ICacheClient cacheClient, IMessagePublisher messagePublisher, SystemHealthChecker healthChecker, IQueue<EventPost> eventQueue, IQueue<MailMessage> mailQueue, IQueue<EventNotificationWorkItem> notificationQueue, IQueue<WebHookNotification> webHooksQueue, IQueue<EventUserDescription> userDescriptionQueue, IMetricsClient metricsClient) {
     _cacheClient = cacheClient;
     _messagePublisher = messagePublisher;
     _healthChecker = healthChecker;
     _eventQueue = eventQueue;
     _mailQueue = mailQueue;
     _notificationQueue = notificationQueue;
     _webHooksQueue = webHooksQueue;
     _userDescriptionQueue = userDescriptionQueue;
     _metricsClient = metricsClient;
 }
开发者ID:yonglehou,项目名称:Exceptionless,代码行数:11,代码来源:StatusController.cs


示例19: MigrationJobBase

        public MigrationJobBase(IElasticClient elasticClient, EventUpgraderPluginManager eventUpgraderPluginManager, EventIndex eventIndex, StackIndex stackIndex, IValidator<Stack> stackValidator, IValidator<PersistentEvent> eventValidator, IGeoIPResolver geoIpResolver, ILockProvider lockProvider, ICacheClient cache) {
            _eventUpgraderPluginManager = eventUpgraderPluginManager;
            _mongoDatabase = GetMongoDatabase();
            _eventRepository = new EventMigrationRepository(elasticClient, eventIndex, eventValidator);
            _stackRepository = new StackMigrationRepository(elasticClient, stackIndex, _eventRepository, stackValidator);
            _geoIpResolver = geoIpResolver;
            _lockProvider = lockProvider;
            _cache = cache;

            _batchSize = MigrationSettings.Current.MigrationBatchSize;
        }
开发者ID:hanu412,项目名称:Exceptionless,代码行数:11,代码来源:MigrationJobBase.cs


示例20: EventNotificationsJob

 public EventNotificationsJob(IQueue<EventNotificationWorkItem> queue, IMailer mailer,
     IOrganizationRepository organizationRepository, IProjectRepository projectRepository, IStackRepository stackRepository,
     IUserRepository userRepository, IEventRepository eventRepository, ICacheClient cacheClient) {
     _queue = queue;
     _mailer = mailer;
     _organizationRepository = organizationRepository;
     _projectRepository = projectRepository;
     _stackRepository = stackRepository;
     _userRepository = userRepository;
     _eventRepository = eventRepository;
     _cacheClient = cacheClient;
 }
开发者ID:aamarber,项目名称:Exceptionless,代码行数:12,代码来源:EventNotificationsJob.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ICacheManager类代码示例发布时间:2022-05-24
下一篇:
C# ICache类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap