LettuceClusterTopologyProvider does not use cached topology
In JedisClusterTopologyProvider getTopology uses cached value for some time so it is better for performance and memory. In LettuceClusterTopologyProvider it is not done in the same way - always new value and topology are created.
Is it possible to somehow use cached value also in LettuceClusterTopologyProvider? When we are doing health checks often I see it impacts performance and memory heavily.
The Lettuce integration uses the cached topology from the Lettuce RedisClusterClient object. Probably, you're referring to the repeated conversion from Lettuce objects to Spring Data Redis DTO's.
Lettuce updates the Partition object in place instead of creating new Partition objects. There's also no hashCode or equals method we could leverage to cache the converted objects.
This requires a bit more thought.