PHP Класс yii2tech\admin\actions\FlushCache

The cache component to be flushed can be explicitly defined via [[cache]] or fetched automatically. Note that the action uses cache components defined in your current web application configuration file. If you wish to flush cache defined at other application, you should duplicate its definition in the configuration file, or setup it explicitly via [[cache]] property.
С версии: 1.0
Автор: Paul Klimov ([email protected])
Наследование: extends Action
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$cache cache component(s), which should be flushed. If not set action will flush all cache components found in current application. Each cache component can be specified as application component name, instance of [[Cache]] or its configuration. For example: php [ 'cache', 'frontendCache' => [ 'class' => 'yii\caching\DbCache', 'cacheTable' => '{{%frontendCache}}', ], 'objectCache' => new \yii\caching\DbCache(['cacheTable' => '{{%objectCache}}']), ]
$flash flash message to be set on success.
$returnUrl the default return URL in case it was not set previously. This URL will be used only in case automatic determine of return URL failed.

Открытые методы

Метод Описание
run ( string | array | null $name = null ) : mixed Flushes associated cache components.

Приватные методы

Метод Описание
findCaches ( array $cachesNames = [] ) : array Returns array of caches in the system, keys are cache components names, values are class names.
flushCaches ( array $caches ) Flushes given caches list.
goBack ( ) : mixed Redirects the browser to the last visited page.
isCacheClass ( string $className ) : boolean Checks if given class is a Cache class.

Описание методов

run() публичный Метод

Flushes associated cache components.
public run ( string | array | null $name = null ) : mixed
$name string | array | null name of the cache component(s), which should be flushed.
Результат mixed response.

Описание свойств

$cache публичное свойство

cache component(s), which should be flushed. If not set action will flush all cache components found in current application. Each cache component can be specified as application component name, instance of [[Cache]] or its configuration. For example: php [ 'cache', 'frontendCache' => [ 'class' => 'yii\caching\DbCache', 'cacheTable' => '{{%frontendCache}}', ], 'objectCache' => new \yii\caching\DbCache(['cacheTable' => '{{%objectCache}}']), ]
public $cache

$flash публичное свойство

flash message to be set on success.
См. также: Action::setFlash() for details on how setup flash.
public $flash

$returnUrl публичное свойство

the default return URL in case it was not set previously. This URL will be used only in case automatic determine of return URL failed.
public $returnUrl