You are here

function depcalc_entity_presave in Dependency Calculation 8

Implements hook_entity_presave().

File

./depcalc.module, line 9

Code

function depcalc_entity_presave(EntityInterface $entity) {
  if ($uuid = $entity
    ->uuid()) {
    $backend = \Drupal::cache('depcalc');
    $backend
      ->invalidate($uuid);
    Cache::invalidateTags([
      $uuid,
    ]);
  }
}