mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
remove redis as caching is no longer needed now
This commit is contained in:
@@ -1,10 +1,6 @@
|
||||
package com.commafeed;
|
||||
|
||||
import com.codahale.metrics.MetricRegistry;
|
||||
import com.commafeed.CommaFeedConfiguration.Redis;
|
||||
import com.commafeed.backend.cache.CacheService;
|
||||
import com.commafeed.backend.cache.NoopCacheService;
|
||||
import com.commafeed.backend.cache.RedisCacheService;
|
||||
|
||||
import jakarta.enterprise.inject.Produces;
|
||||
import jakarta.inject.Singleton;
|
||||
@@ -12,17 +8,6 @@ import jakarta.inject.Singleton;
|
||||
@Singleton
|
||||
public class CommaFeedProducers {
|
||||
|
||||
@Produces
|
||||
@Singleton
|
||||
public CacheService cacheService(CommaFeedConfiguration config) {
|
||||
Redis redis = config.redis();
|
||||
if (redis.host().isEmpty()) {
|
||||
return new NoopCacheService();
|
||||
}
|
||||
|
||||
return new RedisCacheService(redis.build());
|
||||
}
|
||||
|
||||
@Produces
|
||||
@Singleton
|
||||
public MetricRegistry metricRegistry() {
|
||||
|
||||
Reference in New Issue
Block a user