public static ServiceCatalogCache newCache(
final CatalogClient catalogClient,
final String serviceName,
final QueryOptions queryOptions,
final int watchSeconds) {
final CallbackConsumer<CatalogService> callbackConsumer = (index, callback) ->
catalogClient.getService(serviceName, watchParams(index, watchSeconds, queryOptions), callback);
CacheDescriptor cacheDescriptor = new CacheDescriptor("catalog.service", serviceName);
return new ServiceCatalogCache(CatalogService::getServiceId,
callbackConsumer,
catalogClient.getConfig().getCacheConfig(),
catalogClient.getEventHandler(),
cacheDescriptor);
}