RemotePersistentCacheService throws IllegalArgumentException if both redis and disk cache are disabled
Contribution by Axel Hanikel (ahanikel)
@@ -60,8 +60,10 @@ public class RemotePersistentCacheService {
public void activate(ComponentContext context, Configuration config) throws IOException {
osgiWhiteboard = new OsgiWhiteboard(context.getBundleContext());
persistentCache = createPersistentCache(config, closer);
+ if (persistentCache != null) {
registration = context.getBundleContext().registerService(PersistentCache.class.getName(), persistentCache, new Properties());
}
+ }
@Deactivate
public void deactivate() throws IOException {
