mirror of
https://github.com/yiisoft/yii2.git
synced 2025-08-26 06:15:19 +08:00
@ -6,7 +6,7 @@ use yii\captcha\Captcha;
|
|||||||
/**
|
/**
|
||||||
* @var yii\web\View $this
|
* @var yii\web\View $this
|
||||||
* @var yii\widgets\ActiveForm $form
|
* @var yii\widgets\ActiveForm $form
|
||||||
* @var app\models\ContactForm $model
|
* @var frontend\models\ContactForm $model
|
||||||
*/
|
*/
|
||||||
$this->title = 'Contact';
|
$this->title = 'Contact';
|
||||||
$this->params['breadcrumbs'][] = $this->title;
|
$this->params['breadcrumbs'][] = $this->title;
|
||||||
|
@ -118,7 +118,7 @@ in cache and we should regenerate it:
|
|||||||
public function getCachedData()
|
public function getCachedData()
|
||||||
{
|
{
|
||||||
$key = /* generate unique key here */;
|
$key = /* generate unique key here */;
|
||||||
$value = Yii::$app->getCache()->get($key);
|
$value = Yii::$app->cache->get($key);
|
||||||
if ($value === false) {
|
if ($value === false) {
|
||||||
$value = /* regenerate value because it is not found in cache and then save it in cache for later use */;
|
$value = /* regenerate value because it is not found in cache and then save it in cache for later use */;
|
||||||
Yii::$app->cache->set($key, $value);
|
Yii::$app->cache->set($key, $value);
|
||||||
|
Reference in New Issue
Block a user