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


C# ICacheManager.GetCache方法代码示例

本文整理汇总了C#中ICacheManager.GetCache方法的典型用法代码示例。如果您正苦于以下问题:C# ICacheManager.GetCache方法的具体用法?C# ICacheManager.GetCache怎么用?C# ICacheManager.GetCache使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ICacheManager的用法示例。


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

示例1: PlexServerService

 public PlexServerService(ICacheManager cacheManager, IPlexServerProxy plexServerProxy, Logger logger)
 {
     _versionCache = cacheManager.GetCache<Version>(GetType(), "versionCache");
     _partialUpdateCache = cacheManager.GetCache<bool>(GetType(), "partialUpdateCache");
     _plexServerProxy = plexServerProxy;
     _logger = logger;
 }
开发者ID:drewfreyling,项目名称:NzbDrone,代码行数:7,代码来源:PlexServerService.cs

示例2: UTorrentProxy

        public UTorrentProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
        {
            _httpClient = httpClient;
            _logger = logger;

            _authCookieCache = cacheManager.GetCache<Dictionary<string, string>>(GetType(), "authCookies");
            _authTokenCache = cacheManager.GetCache<string>(GetType(), "authTokens");
        }
开发者ID:drewfreyling,项目名称:NzbDrone,代码行数:8,代码来源:UTorrentProxy.cs

示例3: FileNameBuilder

 public FileNameBuilder(INamingConfigService namingConfigService,
                        IQualityDefinitionService qualityDefinitionService,
                        ICacheManager cacheManager,
                        Logger logger)
 {
     _namingConfigService = namingConfigService;
     _qualityDefinitionService = qualityDefinitionService;
     _episodeFormatCache = cacheManager.GetCache<EpisodeFormat[]>(GetType(), "episodeFormat");
     _absoluteEpisodeFormatCache = cacheManager.GetCache<AbsoluteEpisodeFormat[]>(GetType(), "absoluteEpisodeFormat");
     _logger = logger;
 }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:11,代码来源:FileNameBuilder.cs

示例4: TransmissionProxy

        public TransmissionProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
        {
            _httpClient = httpClient;
            _logger = logger;

            _authSessionIDCache = cacheManager.GetCache<string>(GetType(), "authSessionID");
        }
开发者ID:mike-tesch,项目名称:Sonarr,代码行数:7,代码来源:TransmissionProxy.cs

示例5: ScanWatchFolder

 public ScanWatchFolder(ICacheManager cacheManager, IDiskScanService diskScanService, IDiskProvider diskProvider, Logger logger)
 {
     _logger = logger;
     _diskProvider = diskProvider;
     _diskScanService = diskScanService;
     _watchFolderItemCache = cacheManager.GetCache<Dictionary<string, WatchFolderItem>>(GetType());
 }
开发者ID:mike-tesch,项目名称:Sonarr,代码行数:7,代码来源:ScanWatchFolder.cs

示例6: SettingManager

        /// <inheritdoc/>
        public SettingManager(ISettingDefinitionManager settingDefinitionManager, ICacheManager cacheManager)
        {
            _settingDefinitionManager = settingDefinitionManager;

            AbpSession = NullAbpSession.Instance;
            SettingStore = DefaultConfigSettingStore.Instance;

            _applicationSettings = new Lazy<Dictionary<string, SettingInfo>>(() => AsyncHelper.RunSync(GetApplicationSettingsFromDatabase), true);

            _tenantSettingCache = cacheManager
                .GetCache("AbpTenantSettingsCache")
                .AsTyped<int, Dictionary<string, SettingInfo>>();

            _userSettingCache = cacheManager
                .GetCache("AbpUserSettingsCache")
                .AsTyped<long, Dictionary<string, SettingInfo>>();
        }
开发者ID:takint,项目名称:aspnetboilerplate,代码行数:18,代码来源:SettingManager.cs

示例7: TrackedDownloadService

 public TrackedDownloadService(IParsingService parsingService,
     ICacheManager cacheManager,
     IHistoryService historyService,
     Logger logger)
 {
     _parsingService = parsingService;
     _historyService = historyService;
     _cache = cacheManager.GetCache<TrackedDownload>(GetType());
     _logger = logger;
 }
开发者ID:keep3r,项目名称:Sonarr,代码行数:10,代码来源:TrackedDownloadService.cs

示例8: FileNameBuilder

 public FileNameBuilder(INamingConfigService namingConfigService,
                        IQualityDefinitionService qualityDefinitionService,
                        ICacheManager cacheManager,
                        Logger logger)
 {
     _namingConfigService = namingConfigService;
     _qualityDefinitionService = qualityDefinitionService;
     _patternCache = cacheManager.GetCache<EpisodeFormat>(GetType());
     _logger = logger;
 }
开发者ID:Kiljoymccoy,项目名称:NzbDrone,代码行数:10,代码来源:FileNameBuilder.cs

示例9: XbmcService

        public XbmcService(IXbmcJsonApiProxy proxy,
                           IEnumerable<IApiProvider> apiProviders,
                           ICacheManager cacheManager,
                           Logger logger)
        {
            _proxy = proxy;
            _apiProviders = apiProviders;
            _logger = logger;

            _xbmcVersionCache = cacheManager.GetCache<XbmcVersion>(GetType());
        }
开发者ID:mike-tesch,项目名称:Sonarr,代码行数:11,代码来源:XbmcService.cs

示例10: RemotePathMappingService

        public RemotePathMappingService(IDownloadClientRepository downloadClientRepository,
                                        IRemotePathMappingRepository remotePathMappingRepository,
                                        IDiskProvider diskProvider,
                                        ICacheManager cacheManager,
                                        Logger logger)
        {
            _remotePathMappingRepository = remotePathMappingRepository;
            _diskProvider = diskProvider;
            _logger = logger;

            _cache = cacheManager.GetCache<List<RemotePathMapping>>(GetType());
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:12,代码来源:RemotePathMappingService.cs

示例11: MemoryCacheManager_Tests

        public MemoryCacheManager_Tests()
        {
            LocalIocManager.Register<ICachingConfiguration, CachingConfiguration>();
            LocalIocManager.Register<ICacheManager, AbpMemoryCacheManager>();
            _cacheManager = LocalIocManager.Resolve<ICacheManager>();

            var defaultSlidingExpireTime = TimeSpan.FromHours(24);
            LocalIocManager.Resolve<ICachingConfiguration>().ConfigureAll(cache =>
            {
                cache.DefaultSlidingExpireTime = defaultSlidingExpireTime;
            });

            _cache = _cacheManager.GetCache<string, MyCacheItem>("MyCacheItems");
            _cache.DefaultSlidingExpireTime.ShouldBe(defaultSlidingExpireTime);
        }
开发者ID:halowangquan,项目名称:aspnetboilerplate,代码行数:15,代码来源:MemoryCacheManager_Tests.cs

示例12: MemoryCacheManager_Tests

        public MemoryCacheManager_Tests()
        {
            LocalIocManager.Register<ICachingConfiguration, CachingConfiguration>();
            LocalIocManager.Register<ICacheManager, AbpMemoryCacheManager>();
            LocalIocManager.Register<MyClientPropertyInjects>(DependencyLifeStyle.Transient);
            LocalIocManager.IocContainer.Register(Component.For<IAbpStartupConfiguration>().UsingFactoryMethod(() => Substitute.For<IAbpStartupConfiguration>()));

            _cacheManager = LocalIocManager.Resolve<ICacheManager>();

            var defaultSlidingExpireTime = TimeSpan.FromHours(24);
            LocalIocManager.Resolve<ICachingConfiguration>().ConfigureAll(cache =>
            {
                cache.DefaultSlidingExpireTime = defaultSlidingExpireTime;
            });

            _cache = _cacheManager.GetCache<string, MyCacheItem>("MyCacheItems");
            _cache.DefaultSlidingExpireTime.ShouldBe(defaultSlidingExpireTime);
        }
开发者ID:ZhaoRd,项目名称:aspnetboilerplate,代码行数:18,代码来源:MemoryCacheManager_Tests.cs

示例13: ReleaseModule

        public ReleaseModule(IFetchAndParseRss rssFetcherAndParser,
                             ISearchForNzb nzbSearchService,
                             IMakeDownloadDecision downloadDecisionMaker,
                             IPrioritizeDownloadDecision prioritizeDownloadDecision,
                             IDownloadService downloadService,
                             ICacheManager cacheManager,
                             Logger logger)
        {
            _rssFetcherAndParser = rssFetcherAndParser;
            _nzbSearchService = nzbSearchService;
            _downloadDecisionMaker = downloadDecisionMaker;
            _prioritizeDownloadDecision = prioritizeDownloadDecision;
            _downloadService = downloadService;
            _logger = logger;

            GetResourceAll = GetReleases;
            Post["/"] = x => DownloadRelease(this.Bind<ReleaseResource>());

            PostValidator.RuleFor(s => s.DownloadAllowed).Equal(true);
            PostValidator.RuleFor(s => s.Guid).NotEmpty();

            _remoteEpisodeCache = cacheManager.GetCache<RemoteEpisode>(GetType(), "remoteEpisodes");
        }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:23,代码来源:ReleaseModule.cs

示例14: RateLimitService

 public RateLimitService(ICacheManager cacheManager, Logger logger)
 {
     _rateLimitStore = cacheManager.GetCache<ConcurrentDictionary<string, DateTime>>(GetType(), "rateLimitStore").Get("rateLimitStore", () => new ConcurrentDictionary<string, DateTime>());
     _logger = logger;
 }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:5,代码来源:RateLimitService.cs

示例15: RarbgTokenProvider

 public RarbgTokenProvider(IHttpClient httpClient, ICacheManager cacheManager, Logger logger)
 {
     _httpClient = httpClient;
     _tokenCache = cacheManager.GetCache<string>(GetType());
     _logger = logger;
 }
开发者ID:Djohnnie,项目名称:Sonarr,代码行数:6,代码来源:RarbgTokenProvider.cs


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