spring-boot-starter-data-redis Cacheable(sync=true) sees not work?
问题 i want to use Cacheable(sync=true) to controll concurrent behaviors to access a method @Service @CacheConfig(cacheNames = "book") public class BookService { @Cacheable(key = "#isbn",sync = true) public Book book(String isbn,int id) { System.out.println("wait 3s..."); try { Thread.sleep(3000); } catch (InterruptedException e) { e.printStackTrace(); } return new Book(isbn, "xxxx"); } } write a test case: ExecutorService executorService = Executors.newFixedThreadPool(10); for (int i = 0; i < 100