public CacheProfile(int cacheId, string profileName, ICacheEngine engine) : this() { ProfileName = profileName; Engine = engine; CacheId = cacheId; }
public CacheController(ICacheEngine cacheEngine, ICacheConfiguration cacheConfiguration, IReceptionServiceIssueCache issueCache) { _cacheEngine = cacheEngine; _cacheConfiguration = cacheConfiguration; _issueCache = issueCache; }
bool ICacheable.GetFromCache(ICacheEngine cacheEngine, CacheKey cacheKey, out object item) { T cachedItem; bool found = cacheEngine.Get(cacheKey, out cachedItem); item = cachedItem; return(found); }
public CacheProfile(int cacheId, string profileName, ICacheEngine engine, string timeout) : this() { ProfileName = profileName; Engine = engine; Timeout = TimeSpan.Parse(timeout); CacheId = cacheId; }
public void SetCachingEngine(ICacheEngine cacheEngine) { _cacheEngine = cacheEngine; _cacheEngine.AddGroup(new CacheGroupDefinition { ExpireAfter = TimeSpan.FromMinutes(20), Id = "basicSessionManager", RollingExpiration = true }); }
protected virtual void Remove(ICacheable cacheableItem, CacheProfile cacheProfile, ICacheEngine cacheEngine) { cacheEngine.Remove(CacheKey.ForProfile(cacheProfile) .WithKey(cacheableItem.CacheItemKey) .Create()); }
public CacheController(ICacheConfiguration cacheConfiguration, ICacheEngine cacheEngine) { _cacheConfiguration = cacheConfiguration; _cacheEngine = cacheEngine; }
public WarsAPI(Environment env = Environment.Main, ICacheEngine <Wars> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }
public void SetCachingEngine(ICacheEngine cacheEngine) { _cacheEngine = cacheEngine; _cacheEngine.AddGroup(new CacheGroupDefinition { ExpireAfter = TimeSpan.FromDays(1), Id = RAZOR_CACHE_ID, RollingExpiration = true }); }
public ApplicantAPI(Environment env = Environment.Main, ICacheEngine <Applicant> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }
public AlliancesAPI(Environment env = Environment.Main, ICacheEngine <Alliances> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }
public RedisMemoryHybridCacheEngine(ICacheEngine memoryCache, ICacheEngine redisCache) { _memoryCacheEngine = memoryCache; _redisCacheEngine = redisCache; }
public CityAPI(Environment env = Environment.Main, ICacheEngine <City> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }
public NationMilitaryAPI(Environment env = Environment.Main, ICacheEngine <NationMilitary> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }
public void SetCacheEngine(ICacheEngine cacheEngine) { _cacheEngine = cacheEngine; }
public TradePriceAPI(Environment env = Environment.Main, ICacheEngine <TradePrice> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }
public static IServiceCollection AddCacheInstance <TService, TCacheInstance>(this IServiceCollection services, ICacheEngine cacheEngine, Action <ICacheOptions> setupAction = null) where TCacheInstance : CacheInstance, TService, new() where TService : class { var options = new CacheOptions(); setupAction?.Invoke(options); var cacheInstance = Activator.CreateInstance <TCacheInstance>(); cacheInstance.SetCacheEngine(cacheEngine); cacheInstance.SetCacheOptions(options); return(services .AddSingleton <TService>(cacheInstance) .AddSingleton <ICacheInstance>(cacheInstance) .AddCacheService()); }
public static IServiceCollection AddCacheInstance <TCacheInstance>(this IServiceCollection services, ICacheEngine cacheEngine, Action <ICacheOptions> setupAction = null) where TCacheInstance : CacheInstance, new() { return(services.AddCacheInstance <TCacheInstance, TCacheInstance>(cacheEngine, setupAction)); }
public NodeCacheCoroutine(ICacheEngine nodeCache) { _nodeCache = nodeCache; InstanceName = "NodeCacheCoroutine"; }
public UserRepository(IDatabaseEngine databaseEngine, ICacheEngine <int, User> userCacheEngine, bool cacheEnabled) { _databaseEngine = databaseEngine; _userCacheEngine = userCacheEngine; _cacheEnabled = cacheEnabled; }
public DeviceDBService(string iotHubConnectionString) { _Cache = new MemoryCacheEngine(); _DeviceTwinRepo = new DeviceTwinRepository(iotHubConnectionString); }
internal void SetCacheEngine(ICacheEngine cacheEngine) { _cache = cacheEngine; }
protected virtual void Flush(CacheInvalidationItem item, CacheProfile cacheProfile, ICacheEngine cacheEngine) { cacheEngine.Clear(cacheProfile, item.CacheItemKey); }
public TradeHistoryAPI(Environment env = Environment.Main, ICacheEngine <TradeHistory> cacheEngine = null) : base(env) { this._cacheEngine = cacheEngine; }