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
파일 보기 프로젝트 열기: yii2tech/admin

공개 프로퍼티들

프로퍼티 타입 설명
$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