修改修改缓冲

parent 2c209c1f
......@@ -20,13 +20,13 @@ public class ContactServiceImpl implements IContactService {
private IContactRepository contactRepository;
@Override
@Cacheable(value = "contact", key = "'contact' + #userId", unless = "#result == null or #result.size() == 0", cacheManager = "cacheManager")
@Cacheable(value = "contact1", key = "'contact' + #userId", unless = "#result == null or #result.size() == 0", cacheManager = "cacheManager")
public List<Contact> findByUserId(Long userId) {
return contactRepository.findByUserId(userId);
}
@Override
@CacheEvict(value = "contact", key = "'contact' + #contacts.get(0).userId", cacheManager = "cacheManager")
@CacheEvict(value = "contact1", key = "'contact' + #contacts.get(0).userId", cacheManager = "cacheManager")
public List<Contact> save(List<Contact> contacts) {
return contactRepository.save(contacts);
}
......
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