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