I manually update an order using the following code.
db_update('uc_orders') // Table name no longer needs {}
->fields(array(
'order_status' => 'payment_received',
))
->condition('order_id', $order->order_id)
->execute();
Then I visit /admin/store/orders/view, but the value for the order still shows a Pending. If I clear the cache, the new status is Payment received, as it should be.
How do I clear the specific order cache so that it updates immediately?
The following code does what I want, but I would prefer clearing the cache for the specific order that is manually updated.
$orderEntity = Order::load($order_id);
$orderEntity->setStatusId('payment_received');
$orderEntity->save();