configurable redis pool (fix #629)

This commit is contained in:
Athou
2014-09-22 09:51:55 +02:00
parent c3feaf9a15
commit 2a36cc4327
6 changed files with 72 additions and 17 deletions

View File

@@ -30,7 +30,7 @@ public class CommaFeedModule extends AbstractModule {
@Override
protected void configure() {
CacheService cacheService = config.getApplicationSettings().getCache() == CacheType.NOOP ? new NoopCacheService()
: new RedisCacheService();
: new RedisCacheService(config.getRedisPoolFactory().build());
log.info("using cache {}", cacheService.getClass());
bind(CacheService.class).toInstance(cacheService);
}