public RedisCacheProvider(SvzConfig config, string cacheName, int ttlSeconds) { _connection = ConnectionMultiplexer.Connect(config.Redis); _database = _connection.GetDatabase(); _cacheName = cacheName; _ttlSeconds = ttlSeconds; }
public BookCacheValueSource(SvzConfig config) { _config = config; }
public BookService() { _config = SvzConfig.GetConfig(); _cache = new CacheManager <int, BookView>(new BookCacheValueSource(_config), new RedisCacheProvider <int, BookView>(_config, "Svz", 15)); }