You are here

function oembed_cron in oEmbed 8

Same name and namespace in other branches
  1. 7 oembed.module \oembed_cron()
  2. 7.0 oembed.module \oembed_cron()

Implements hook_cron().

File

./oembed.module, line 59
Core functionality for oEmbed

Code

function oembed_cron() {

  // If cache_oembed opts out of oembed_flush_caches(), then system_cron()
  // doesn't clear its expired records, so do so here.
  if (!\Drupal::config('oembed.settings')
    ->get('cache.flush')) {
    \Drupal::cache('oembed')
      ->deleteAll();
  }
}