### Question:
EmployeeService { @Cacheable(value = "employeeCache") public Employee getEmployeeByName(String empname) { return getFromDB(empname); }  @Cacheable(value = "employeeCache"/*,condition="#empname.length() <= 4"*/) // 使用了一个缓存名叫 employeeCache Employee getEmployeeByName(String empname); @Cacheable(value = "employeeCache", key = "#id") // 使用了一个缓存名为employeeCache的缓存 String getEmployee(Integer id); @Cacheable(value = "employeeCache", key = "#id", condition = "#id <= 10") // 使用了一个缓存名为employeeCache的缓存,缓存id小于等于10 String findEmployee(Integer id); @CacheEvict(value = "employeeCache", allEntries = true) List<Employee> listEmployee(); @CachePut(value = "employeeCache", key = "#employee.getEmpname()") // 清空 employeeCache 缓存 void updateEmployee(Employee employee); @CacheEvict(value = "employeeCache", allEntries = true) // 清空 employeeCache 缓存 void reload();  }### Answer:
@Test public void testCacheCondition() { employeeService.getEmployeeByName("somebody"); employeeService.getEmployeeByName("sbd"); employeeService.getEmployeeByName("somebody"); employeeService.getEmployeeByName("sbd"); }