Update a single object with @ CachePut, query all objects with @ Cacheable, so how do you write the annotation?

@ CachePut
public Result updateUser (User user) {

}

@ Cacheable
public Result getUserList () {

}
query the (getUserList) of all users and store it in the cache. After modifying the individual user information (updateUser), how to update the cache of all users?


Spring Cache storage is a way of key-value pairs, and your requirements cannot be realized by annotations. It is recommended to use CacheManager to deal with getUserList

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3882c-2c112.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3882c-2c112.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?