本文整理汇总了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;
}
示例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");
}
示例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;
}
示例4: TransmissionProxy
public TransmissionProxy(ICacheManager cacheManager, IHttpClient httpClient, Logger logger)
{
_httpClient = httpClient;
_logger = logger;
_authSessionIDCache = cacheManager.GetCache<string>(GetType(), "authSessionID");
}
示例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());
}
示例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>>();
}
示例7: TrackedDownloadService
public TrackedDownloadService(IParsingService parsingService,
ICacheManager cacheManager,
IHistoryService historyService,
Logger logger)
{
_parsingService = parsingService;
_historyService = historyService;
_cache = cacheManager.GetCache<TrackedDownload>(GetType());
_logger = logger;
}
示例8: FileNameBuilder
public FileNameBuilder(INamingConfigService namingConfigService,
IQualityDefinitionService qualityDefinitionService,
ICacheManager cacheManager,
Logger logger)
{
_namingConfigService = namingConfigService;
_qualityDefinitionService = qualityDefinitionService;
_patternCache = cacheManager.GetCache<EpisodeFormat>(GetType());
_logger = logger;
}
示例9: XbmcService
public XbmcService(IXbmcJsonApiProxy proxy,
IEnumerable<IApiProvider> apiProviders,
ICacheManager cacheManager,
Logger logger)
{
_proxy = proxy;
_apiProviders = apiProviders;
_logger = logger;
_xbmcVersionCache = cacheManager.GetCache<XbmcVersion>(GetType());
}
示例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());
}
示例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);
}
示例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);
}
示例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");
}
示例14: RateLimitService
public RateLimitService(ICacheManager cacheManager, Logger logger)
{
_rateLimitStore = cacheManager.GetCache<ConcurrentDictionary<string, DateTime>>(GetType(), "rateLimitStore").Get("rateLimitStore", () => new ConcurrentDictionary<string, DateTime>());
_logger = logger;
}
示例15: RarbgTokenProvider
public RarbgTokenProvider(IHttpClient httpClient, ICacheManager cacheManager, Logger logger)
{
_httpClient = httpClient;
_tokenCache = cacheManager.GetCache<string>(GetType());
_logger = logger;
}