X-Git-Url: https://yaffs.net/gitweb/?a=blobdiff_plain;f=vendor%2Fdrush%2Fdrush%2Fcommands%2Fcore%2Fdrupal%2Fcache_8.inc;fp=vendor%2Fdrush%2Fdrush%2Fcommands%2Fcore%2Fdrupal%2Fcache_8.inc;h=0000000000000000000000000000000000000000;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hp=fca98a7167d9983fc6598a3160ee9887890f7da6;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0;p=yaffs-website diff --git a/vendor/drush/drush/commands/core/drupal/cache_8.inc b/vendor/drush/drush/commands/core/drupal/cache_8.inc deleted file mode 100644 index fca98a716..000000000 --- a/vendor/drush/drush/commands/core/drupal/cache_8.inc +++ /dev/null @@ -1,87 +0,0 @@ -get($cid); -} - -/** - * The default bin. - * - * @return string - */ -function _drush_cache_bin_default() { - return 'default'; -} - -function _drush_cache_command_set($cid, $data, $bin, $expire, $tags) { - if (is_null($bin)) { - $bin = _drush_cache_bin_default(); - } - - // Convert the "expire" argument to a valid value for Drupal's cache_set(). - if ($expire == 'CACHE_TEMPORARY') { - $expire = Cache::TEMPORARY; - } - if (!isset($expire) || $expire == 'CACHE_PERMANENT') { - $expire = Cache::PERMANENT; - } - - return \Drupal::cache($bin)->set($cid, $data, $expire, $tags); -} - -function _drush_cache_clear_types($include_bootstrapped_types) { - $types = array( - 'drush' => 'drush_cache_clear_drush', - ); - if ($include_bootstrapped_types) { - $types += array( - 'theme-registry' => 'drush_cache_clear_theme_registry', - 'router' => 'drush_cache_clear_router', - 'css-js' => 'drush_cache_clear_css_js', - 'module-list' => 'drush_get_modules', - 'theme-list' => 'drush_get_themes', - 'render' => 'drush_cache_clear_render', - ); - } - return $types; -} - -function drush_cache_clear_theme_registry() { - \Drupal::service('theme.registry')->reset(); -} - -function drush_cache_clear_router() { - /** @var \Drupal\Core\Routing\RouteBuilderInterface $router_builder */ - $router_builder = \Drupal::service('router.builder'); - $router_builder->rebuild(); -} - -function drush_cache_clear_css_js() { - _drupal_flush_css_js(); - drupal_clear_css_cache(); - drupal_clear_js_cache(); -} - -/** - * Clear the cache of the block output. - */ -function drush_cache_clear_block() { - // There is no distinct block cache in D8. See https://github.com/drush-ops/drush/issues/1531. - // \Drupal::cache('block')->deleteAll(); -} - -/** - * Clears the render cache entries. - */ -function drush_cache_clear_render() { - Cache::invalidateTags(['rendered']); -}