How do I clear the order cache? I manually update an order using the following code.

db_update('uc_orders') // Table name no longer needs {}
  -&gt;fields(array(
    'order_status' =&gt; 'payment_received',
  ))
  -&gt;condition('order_id', $order-&gt;order_id)
  -&gt;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-&gt;setStatusId('payment_received');
$orderEntity-&gt;save();
\Drupal::service('entity_type.manager')-&gt;getStorage('commerce_order')-&gt;resetCache([ORDER_ID]);


This service which used in OrderReassignTest.php will help you to Reload the order based on Order ID.