Answer the question
In order to leave comments, you need to log in
Yii2 why data is not written to cache?
Added to the components section:
'cache' => [
'class' => 'yii\caching\FileCache',
],
$data = \Yii::$app->cache->get('key_name');
if ($data === false) {
$a = \Yii::$app->cache->add('key_name', "value", 60);
}
Answer the question
In order to leave comments, you need to log in
The problem was in synchronizing the files of the guest machine with the host. Under this case, vagrant-winnfsd was installed in Vagrant. Demolished the plugin, everything is in order.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question