PHP Class yii\console\controllers\CacheController

Since: 2.0
Author: Alexander Makarov ([email protected])
Inheritance: extends yii\console\Controller
Datei anzeigen Open project: yiisoft/yii2

Public Methods

Method Description
actionFlush ( ) Flushes given cache components.
actionFlushAll ( ) Flushes all caches registered in the system.
actionFlushSchema ( string $db = 'db' ) : integer Clears DB schema cache for a given connection component.
actionIndex ( ) Lists the caches that can be flushed.

Private Methods

Method Description
confirmFlush ( array $cachesNames ) : boolean Prompts user with confirmation if caches should be flushed.
findCaches ( array $cachesNames = [] ) : array Returns array of caches in the system, keys are cache components names, values are class names.
isCacheClass ( string $className ) : boolean Checks if given class is a Cache class.
notifyCachesCanBeFlushed ( array $caches ) Notifies user that given caches are found and can be flushed.
notifyFlushed ( array $caches )
notifyNoCachesFound ( ) Notifies user that there was not found any cache in the system.
notifyNotFoundCaches ( array $cachesNames ) Notifies user that given cache components were not found in the system.

Method Details

actionFlush() public method

For example, # flushes caches specified by their id: "first", "second", "third" yii cache/flush first second third
public actionFlush ( )

actionFlushAll() public method

Flushes all caches registered in the system.
public actionFlushAll ( )

actionFlushSchema() public method

# clears cache schema specified by component id: "db" yii cache/flush-schema db
Since: 2.0.1
public actionFlushSchema ( string $db = 'db' ) : integer
$db string id connection component
return integer exit code

actionIndex() public method

Lists the caches that can be flushed.
public actionIndex ( )