@ConditionalOnMissingBean(name = "samlIdPMetadataCache")
        @Bean
        @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
        public Cache<String, SamlIdPMetadataDocument> samlIdPMetadataCache(
            final CasConfigurationProperties casProperties) {
            val idp = casProperties.getAuthn().getSamlIdp();
            return Caffeine.newBuilder().initialCapacity(10)
                .maximumSize(100).expireAfterAccess(Beans.newDuration(idp.getMetadata().getCore().getCacheExpiration())).build();
        }
This is {@link SamlIdPMetadataConfiguration}.

@author Misagh Moayyed
@since 5.2.0
support/cas-server-support-saml-idp/src/main/java/org/apereo/cas/config/SamlIdPMetadataConfiguration.java