Closed Laverrr closed 1 year ago
If I'm not mistaken, Spring's cache abstraction does not support getting cache values for multiple keys in one batch operation. So there's no way to optimize this here, as this library is fully building upon that abstraction (essentially it doesn't even know that Redis exists).
I review the code and found that CollectionCacheableCacheInterceptor#findInCaches this method get value by key from redis one by one using RedisConnection#get. If the number of keys is large, A lot of time will be wasted on network requests. Do u consider change the way of getting cache value from RedisConnection#get to RedisConnection#mget