How do I save a new field value for node without saving the node? I am developing a Drupal 8 website and I added a new field to a custom content type called Download. This field is updated each time a file is downloaded from this content type. I use hook_file_access to find a node from which a file was downloaded. I then get current download count value by getting a field from a node. The value is incremented by 1 and the new value is stored in the field. I then save the node to store the value. Below is the code used for node (field change) saving:

$field_download_count = $entity-&gt;get('field_download_count')-&gt;get(0);
if ($field_download_count == null) {
    $download_count = 1;
} else {
    $download_count = $field_download_count-&gt;getValue()['value'];
    $download_count += 1;
}
$entity-&gt;set('field_download_count', $download_count);
$entity-&gt;setNewRevision(false);
$entity-&gt;save();


The problem is that with this code, updated date of the content changes and this is a problem for me as I use updated date in many view and data is not valid as per this code, updated date is changed with each file download from the node.

Is there a way to store the field value only on Drupal 8?

In Drupal 7, one could use field_attach_update but this function was removed in Drupal 8.

I tried to update the field value using Drupal update SQL function, but this is not a proper way and also didn't play well with a cache system.
You could directly update the field table in the database ? 

$database = \Drupal::database();
  $result = $database->query("UPDATE node__field_download_count SET field_download_count = field_download_count + 1  WHERE entity_id = " . $entity_id);