apollo11 / yii2-behaviors
There is no license information available for the latest version (v1.0.3) of this package.
Collection of global helper behaviors for Yii2 Framework
v1.0.3
2019-04-25 11:20 UTC
Requires
- composer/composer: >=1.6.3
This package is not auto-updated.
Last update: 2024-11-10 06:38:47 UTC
README
Global Page Cache Behavior
Following behavior gives you the ability to enable Yii2 PageCache globally from config. Copy the following config to your respective config file.
... 'as globalCache' => [ 'class' => '\apollo11\behaviors\behaviors\GlobalPageCacheBehavior', 'rules' => [ [ 'controller' => 'about', 'actions' => ['index', 'main'], 'except' => ['view'], 'duration' => 70, 'variations' => [ \apollo11\behaviors\behaviors\GlobalPageCacheBehavior::VARIATION_BY_LANGUAGE, \apollo11\behaviors\behaviors\GlobalPageCacheBehavior::VARIATION_BY_URL, ], ] ] ], ...