@Cacheable @CacheEvict invalid
I has a service like this:
@service
pubic class TestService {
@Cacheable(cacheNames ="user",key = "#userId")
public User fetchUserById(Long userid) {
return new User();
}
public User fetchCurrentUser() {
return fetchUserById(124L);
}
}
there is some problem:
@Cacheable is valid, when I invoke fetchUserById(Long userid).
but @Cacheable is invalid, when I invoke fetchCurrentUser().