Will Spring's @CachePut annotation work with a void return type?
问题 I am attempting to implement caching in my application using Ehcache and the Spring 3.1 built in caching annotations (@Cacheable, @CacheEvict, and @CachePut). I have created a cache as follows: @Cacheable(value = "userCache", key = "#user.id") public List<User> getAllUsers() { ... } I am attempting to update this cache with a new value using the @CachePut annotation as below: @CachePut(value = "userCache", key = "#user.id") public void addUser(User user) { ... } However, the new "User" is not