@@ -19,7 +19,7 @@ public class PersonServiceImpl implements PersonService {
1919 PersonRepository personRepository ;
2020
2121 @ Override
22- @ CachePut (value = "people" , key = "#person.id" )
22+ @ CachePut (value = "people" , key = "#person.id" , depict = "用户信息缓存" )
2323 public Person save (Person person ) {
2424 Person p = personRepository .save (person );
2525 logger .info ("为id、key为:" + p .getId () + "数据做了缓存" );
@@ -41,7 +41,7 @@ public void removeAll() {
4141 }
4242
4343 @ Override
44- @ Cacheable (value = "'people' + ':' + #person.id" , key = "#person.id" , depict = "查询用户信息 " ,
44+ @ Cacheable (value = "'people' + ':' + #person.id" , key = "#person.id" , depict = "用户信息缓存 " ,
4545 firstCache = @ FirstCache (expireTime = 4 , timeUnit = TimeUnit .SECONDS ),
4646 secondaryCache = @ SecondaryCache (expireTime = 15 , preloadTime = 8 , forceRefresh = true , timeUnit = TimeUnit .SECONDS ))
4747 public Person findOne (Person person ) {
@@ -51,7 +51,7 @@ public Person findOne(Person person) {
5151 }
5252
5353 @ Override
54- @ Cacheable (value = "people1" , key = "#person.id" , depict = "查询用户信息1 " ,
54+ @ Cacheable (value = "people1" , key = "#person.id" , depict = "用户信息缓存1 " ,
5555 firstCache = @ FirstCache (expireTime = 4 , timeUnit = TimeUnit .SECONDS ),
5656 secondaryCache = @ SecondaryCache (expireTime = 15 , preloadTime = 8 , forceRefresh = true , timeUnit = TimeUnit .SECONDS ))
5757 public Person findOne1 (Person person ) {
0 commit comments