@Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public SamlIdPMetadataLocator samlIdPMetadataLocator(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("samlIdPMetadataCache")
        final Cache<String, SamlIdPMetadataDocument> samlIdPMetadataCache,
        @Qualifier("samlIdPMetadataGeneratorCipherExecutor")
        final CipherExecutor samlIdPMetadataGeneratorCipherExecutor,
        @Qualifier("redisSamlIdPMetadataTemplate")
        final CasRedisTemplate<String, SamlIdPMetadataDocument> redisSamlIdPMetadataTemplate,
        final CasConfigurationProperties casProperties) {
        return BeanSupplier.of(SamlIdPMetadataLocator.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> new RedisSamlIdPMetadataLocator(samlIdPMetadataGeneratorCipherExecutor,
                samlIdPMetadataCache,
                redisSamlIdPMetadataTemplate,
                applicationContext,
                casProperties.getAuthn().getSamlIdp().getMetadata().getRedis().getScanCount()))
            .otherwiseProxy()
            .get();
    }
This is {@link SamlIdPRedisIdPMetadataConfiguration}.

@author Misagh Moayyed
@since 6.4.0
support/cas-server-support-saml-idp-metadata-redis/src/main/java/org/apereo/cas/config/SamlIdPRedisIdPMetadataConfiguration.java