public SimpleCacheConfig WithCache(SimpleCache cache) { _simpleCache = cache; foreach (var config in _repositoryConfigs.Values) { config.WithCache(cache); } return(this); }
public SimpleCacheConfig( SimpleCache simpleCache, IConfiguration configuration, ILogger logger, string sectionIdentifier = null) : base(configuration, logger, ValidateIsAssigned(sectionIdentifier)) { _simpleCache = simpleCache; _repositoryConfigs = new Dictionary <string, SimpleCacheRepositoryConfig>(); SectionIdentifier = sectionIdentifier; loadRepositoryConfigs(); }
public override string ToString() => SimpleCache.MakeKey(Repository, Key);