function webprofiler_cache_flush

Implements hook_cache_flush().

File

webprofiler/webprofiler.module, line 44

Code

function webprofiler_cache_flush() {
    $config = \Drupal::configFactory()->get('webprofiler.config');
    if ($config->get('purge_on_cache_clear')) {
        $profiler = \Drupal::service('profiler');
        $profiler->purge();
    }
}