Spring @Cacheable methods with lists
问题 I'm using latest Ehcache in my Spring 4.1.4 application. What I have is: class Contact{ int id; int revision; } @Cacheable("contacts") public List<Contact> getContactList(List<Integer> contactIdList) { return namedJdbc.queryForList("select * from contact where id in (:idlist)", Collections.singletonMap("idlist", contactIdList)); } @CachePut(value="contact", key = "id") public void updateContact(Contact toUpdate) { jdbctemplate.update("update contact set revision = ? where id = ?", contact