@ConditionalOnMissingBean(name = "redisSamlIdPMetadataTemplate")
    @Bean
    @RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
    public CasRedisTemplate<String, SamlIdPMetadataDocument> redisSamlIdPMetadataTemplate(
        final ConfigurableApplicationContext applicationContext,
        @Qualifier("redisSamlIdPMetadataConnectionFactory")
        final RedisConnectionFactory redisSamlIdPMetadataConnectionFactory) {
        return BeanSupplier.of(CasRedisTemplate.class)
            .when(CONDITION.given(applicationContext.getEnvironment()))
            .supply(() -> RedisObjectFactory.newRedisTemplate(redisSamlIdPMetadataConnectionFactory))
            .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