0
我有两个服务春Cache驱逐
class CustomerService {
public void removeCustomer(int customerId) {...}
}
class OrderService {
@Cacheable("orders")
public List<Order> getOrders() {...}
}
在removeCustomer()
我希望被拆迁户orders
缓存,因为结果已经改变(被移出客户的订单都没有了)。我如何用Spring的缓存来做到这一点?