You are here

function cacheflush_cron_cacheflush_delete in CacheFlush 8

Implements hook_ENTITY_TYPE_delete().

File

modules/cacheflush_cron/cacheflush_cron.module, line 115
Cacheflush cron module.

Code

function cacheflush_cron_cacheflush_delete(EntityInterface $entity) {
  $cron_job = CronJob::load('cacheflush_preset_' . $entity
    ->id());
  if ($cron_job) {
    $cron_job
      ->delete();
  }
}