protected MetadataResolver initializeChainingMetadataResolver(final List<MetadataResolver> metadataResolvers) {
        return FunctionUtils.doUnchecked(() -> {
            val metadataResolver = new ChainingMetadataResolver();
            metadataResolver.setId(ChainingMetadataResolver.class.getCanonicalName());
            LOGGER.trace("There are [{}] eligible metadata resolver(s) for this request", metadataResolvers.size());
            metadataResolver.setResolvers(metadataResolvers);
            metadataResolver.initialize();
            return metadataResolver;
        });
    }
This is {@link SamlRegisteredServiceMetadataResolverCacheLoader} that uses Guava's cache loading strategy
to keep track of metadata resources and resolvers. The cache loader here supports loading
metadata resources from SAML services, supports dynamic metadata queries and is able
to run various validation filters on the metadata before finally caching the resolver.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-saml-idp-metadata/src/main/java/org/apereo/cas/support/saml/services/idp/metadata/cache/SamlRegisteredServiceMetadataResolverCacheLoader.java