@CacheEvict does not working in same class
AS-IS
// Same Class
@CacheEvict(value = "menuListByUser", key = "#userId")
public void evictMenuWithPageAndCompInfoCacheByUser(String userId) {
log.info(userId + "의 메뉴 캐시정보가 삭제되었습니다.");
}
private void deleteCacheByRoleId(Integer roleId) {
List<String> userIdList = getUserIdListByRoleId(roleId);
for (String userId : userIdList) {
evictMenuWithPageAndCompInfoCacheByUser(userId);
}
}
TO-BE
Last updated