You are here

function drush_pcb_permanent_cache_bin_flush in Permanent Cache Bin 8.2

Same name and namespace in other branches
  1. 8 pcb.drush.inc \drush_pcb_permanent_cache_bin_flush()

Implements drush permanent cache bin flush command.

File

./pcb.drush.inc, line 39
Provides drush commands for pcb.

Code

function drush_pcb_permanent_cache_bin_flush($bin) {
  try {
    \Drupal::service('cache.' . $bin)
      ->deleteAllPermanent();
    drush_print(dt('Deleted all cache for @bin.', [
      '@bin' => $bin,
    ]));
  } catch (\Exception $e) {
    drush_set_error($e
      ->getMessage());
  }
}