yii2中memcache缓存时间无效的解决办法
一、我们配置memcache 在main.php配置文件中
'cache' => [
'class' => 'yii\caching\MemCache',
'servers' => [
[
'host' => '127.0.0.1',
'port' => 11211,
'weight' => 60,
],
],
],
二、在控制器中进行测试
$key = 'name';
原创
2016-11-23 12:07:39 ·
1951 阅读 ·
0 评论