Repository navigation
Add Redis cache support for Spring Cloud LoadBalancer - #1783
Open
yashdotdev13 wants to merge 2 commits into
Open
yashdotdev13 wants to merge 2 commits into
yashdotdev13 wants to merge 2 commits into
Conversation
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
ryanjbaxter
requested changes
Nov 6, 2026
ryanjbaxter
left a comment
Contributor
There was a problem hiding this comment.
ServiceInstance lists can't be written to a default RedisCacheManager because they are not serializable. An integration test using a Redis TestContainer would have caught this so it would be good to add.
Also docs will need to be added
Signed-off-by: 98001yash <yashchauhan.gaya@gmail.com>
Contributor
Author
|
Thanks for the detailed review! I have updated the implementation to address the feedback:
The targeted updated test classes pass: 32 tests, 0 failures, 0 errors. I've pushed these changes in the latest commit. Please let me know if anything else needs adjustment. Thanks! |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds support for reusing an existing Spring Cache
CacheManagerwhen Redis is configured as the cache type for Spring Cloud LoadBalancer.Previously, Spring Cloud LoadBalancer created its own cache manager using Caffeine or the default implementation, regardless of the configured Spring cache type.
Changes
SpringCacheBasedLoadBalancerCacheManagerto delegate cache operations to an existing SpringCacheManager.spring.cache.type=redis.Testing
spring-cloud-loadbalancermodule tests passed (195 tests, 3 skipped).git diff --checkpassed.Fixes #1187