I have a use case like using two different regions Redis. Since the Redis is not synced between two different data centers. Need to update the data center in a synchronized fashion.

I'm facing a problem while updating the cache, The cache is updated in only one region.

@EnableRedisRepositories(basePackageClasses = {RefreshEastCacheRepository.class}, redisTemplateRef = "refreshEastRedisTemplate") @EnableRedisRepositories(basePackageClasses = {RefreshWestCacheRepository.class}, redisTemplateRef = "refreshWestRedisTemplate")

I have configured the two different Redis in the same project and in one of the configurations I have added @Primary(East Region) for the base use-case.

@Repository("eastRepository") public interface RefreshEastCacheRepository extends CrudRepository, QueryByExampleExecutor { } @Repository("westRepository") public interface RefreshWestCacheRepository extends CrudRepository, QueryByExampleExecutor { }

I have Autowired the above repository in my class. When there is any update happened, the cache is updated only in the east region. but it's not updating in the west. If we use RedisTemplate we can update in the two different regions. But I feel comfortable using the repository.save method to update in the cache.

When I dig deeper into the code the container factory is the default for all the Repository and it's the same for all the Repositories.

I need a way to differentiate the two different containers at the Repository level. In the @EnableJPARepository, it allows us to add the EntityBeanFactory but in the EnableRedisRepositories we don't have an option to point out the right container factory.

Is there any better way to do that ???

Comment From: itamarhaber

Hello @aem-quotient

Please note that this issue tracker should be used for reporting bugs or proposing improvements to the Redis server. It appears that your question is related to using Redis with some form of Java - I believe it would be better answered by a different community (perhaps on StackOverflow?) rather than here.

Closing this issue as irrelevant to this repository, but please feel free to reopen or comment if you think otherwise.