filters\PageCache cacheResponse()

cacheResponse() public method (available since version 2.0.3) Caches response properties. public void cacheResponse ( )

filters\PageCache beforeAction()

beforeAction() public method This method is invoked right before an action is to be executed (after all possible filters.) You may override this method to do last-minute preparation for the action. public boolean beforeAction ( $action )$action yii\base\Action The action to be executed. return boolean Whether the action should continue to be executed.

filters\PageCache $view

$view public property The view component to use for caching. If not set, the default application view component yii\web\Application::$view will be used. public yii\base\View $view = null

filters\PageCache $varyByRoute

$varyByRoute public property Whether the content being cached should be differentiated according to the route. A route consists of the requested controller ID and action ID. Defaults to true. public boolean $varyByRoute = true

filters\PageCache $variations

$variations public property List of factors that would cause the variation of the content being cached. Each factor is a string representing a variation (e.g. the language, a GET parameter). The following variation setting will cause the content to be cached in different versions according to the current application language: [ Yii::$app->language, ] public array $variations = null

filters\PageCache $enabled

$enabled public property Whether to enable the page cache. You may use this property to turn on and off the page cache according to specific setting (e.g. enable page cache only for GET requests). public boolean $enabled = true

filters\PageCache $duration

$duration public property Number of seconds that the data can remain valid in cache. Use 0 to indicate that the cached data will never expire. public integer $duration = 60

filters\PageCache $dependency

$dependency public property The dependency that the cached content depends on. This can be either a yii\caching\Dependency object or a configuration array for creating the dependency object. For example, [ 'class' => 'yii\caching\DbDependency', 'sql' => 'SELECT MAX(updated_at) FROM post', ] would make the output cache depend on the last modified time of all posts. If any post has its modification time changed, the cached content would be invalidated. If $cacheCookies or $cach

filters\PageCache $cacheHeaders

$cacheHeaders public property (available since version 2.0.4) A boolean value indicating whether to cache all HTTP headers, or an array of HTTP header names (case-insensitive) indicating which HTTP headers can be cached. Note if your HTTP headers contain sensitive information, you should white-list which headers can be cached. public boolean|array $cacheHeaders = true

filters\PageCache $cacheCookies

$cacheCookies public property (available since version 2.0.4) A boolean value indicating whether to cache all cookies, or an array of cookie names indicating which cookies can be cached. Be very careful with caching cookies, because it may leak sensitive or private data stored in cookies to unwanted users. public boolean|array $cacheCookies = false