Commit bb7fb7c4 authored by xiaoguang.xu's avatar xiaoguang.xu

clean cache

parent e2fd8b2e
...@@ -82,7 +82,7 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -82,7 +82,7 @@ public class UserServiceImpl implements IUserService, IBaseController {
private IContactService contactService; private IContactService contactService;
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneInDb(String phone) { public User findByPhoneInDb(String phone) {
return userRepository.findByPhoneNo(phone); return userRepository.findByPhoneNo(phone);
} }
...@@ -136,13 +136,13 @@ public class UserServiceImpl implements IUserService, IBaseController { ...@@ -136,13 +136,13 @@ public class UserServiceImpl implements IUserService, IBaseController {
} }
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "usercache", key = "'xyqbuser' + #phone", unless = "#result == null", cacheManager = "cacheManager")
public User findByPhoneWithCache(String phone) { public User findByPhoneWithCache(String phone) {
return userRepository.findByPhoneNo(phone); return userRepository.findByPhoneNo(phone);
} }
@Override @Override
@Cacheable(value = "usercache", key = "'xyqbuser' + #uuid", unless = "#result == null", cacheManager = "cacheManager") // @Cacheable(value = "usercache", key = "'xyqbuser' + #uuid", unless = "#result == null", cacheManager = "cacheManager")
public User findByUuidWithCache(String uuid) { public User findByUuidWithCache(String uuid) {
return userRepository.findByUuid(uuid); return userRepository.findByUuid(uuid);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment