class CacheCommands extends DrushCommands implements CustomEventAwareInterface, AutoloaderAwareInterface, StdinAwareInterface (View source)

Traits

CustomEventAwareTrait
StdinAwareTrait
ProcessManagerAwareTrait
LoggerAwareTrait
IO
ConfigAwareTrait

Constants

REQ

OPT

EXIT_SUCCESS

EXIT_FAILURE

Properties

protected $loader from AutoloaderAwareTrait

Methods

getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

No description

LoggerInterface
logger()

Returns a logger object.

io()

Override Robo's IO function with our custom style.

printFile(string $file)

Print the contents of a file.

setAutoloader($loader)

No description

autoloader()

No description

hasAutoloader()

No description

PropertyList
get($cid, $bin = 'default', $options = ['format' => 'json'])

Fetch a cached object and display it.

clear($type, array $args, $options = ['cache-clear' => true])

Clear a specific cache, or all Drupal caches.

interact($input, $output)

No description

set($cid, $data, $bin = 'default', $expire = null, $tags = null, $options = ['input-format' => 'string', 'cache-get' => false])

Cache an object expressed in JSON or var_export() format.

setPrepareData($data, $options)

No description

rebuild($options = ['cache-clear' => true])

Rebuild a Drupal 8 site.

validate(CommandData $commandData)

No description

getTypes($include_bootstrapped_types = false)

Types of caches available for clearing. Contrib commands can hook in their own.

static 
clearDrush()

Clear caches internal to Drush core.

static 
clearBins($args = ['default'])

Clear one or more cache bins.

static 
clearThemeRegistry()

No description

static 
clearRouter()

No description

static 
clearCssJs()

No description

static 
clearRender()

Clears the render cache entries.

static 
clearPlugin()

No description

loadDrupalAutoloader($drupal_root)

Loads the Drupal autoloader and returns the instance.

Details

DrushConfig getConfig()

Replaces same method in ConfigAwareTrait in order to provide a DrushConfig as return type. Helps with IDE completion.

__construct()

protected LoggerInterface logger()

Returns a logger object.

Return Value

LoggerInterface

protected io()

Override Robo's IO function with our custom style.

protected printFile(string $file)

Print the contents of a file.

Parameters

string $file Full path to a file.

setAutoloader($loader)

Parameters

$loader

autoloader()

hasAutoloader()

PropertyList get($cid, $bin = 'default', $options = ['format' => 'json'])

Fetch a cached object and display it.

Parameters

$cid
$bin
$options

Return Value

PropertyList

clear($type, array $args, $options = ['cache-clear' => true])

Clear a specific cache, or all Drupal caches.

Parameters

$type
array $args
$options

interact($input, $output)

Parameters

$input
$output

set($cid, $data, $bin = 'default', $expire = null, $tags = null, $options = ['input-format' => 'string', 'cache-get' => false])

Cache an object expressed in JSON or var_export() format.

Parameters

$cid
$data
$bin
$expire
$tags
$options

protected setPrepareData($data, $options)

Parameters

$data
$options

rebuild($options = ['cache-clear' => true])

Rebuild a Drupal 8 site.

This is a copy of core/rebuild.php. Additionally it also clears Drush cache and Drupal's render cache.

Parameters

$options

validate(CommandData $commandData)

Parameters

CommandData $commandData

getTypes($include_bootstrapped_types = false)

Types of caches available for clearing. Contrib commands can hook in their own.

Parameters

$include_bootstrapped_types

static clearDrush()

Clear caches internal to Drush core.

static clearBins($args = ['default'])

Clear one or more cache bins.

Parameters

$args

static clearThemeRegistry()

static clearRouter()

static clearCssJs()

static clearRender()

Clears the render cache entries.

static clearPlugin()

loadDrupalAutoloader($drupal_root)

Loads the Drupal autoloader and returns the instance.

Parameters

$drupal_root