Hi I am using Spring Boot Cache in my application. I am able to fetch data from db and cached that data.
@Cacheable("employee")
public Optional<List<Employee>> employeeData(){
log.info("Fetched employee details from DB and cached in memory!!");
return employeeRepository.findActiveEmployee();
}
I want to delete or update or add new record in cached object.
How can I use @cachePut to update existing record or insert record or delete existing record based on some condition.