代码拉取完成,页面将自动刷新
The original yiisoft/yii2-redis extension uses socket to communicate. It has performance issues in high concurrency: long response time, and Failed to read from socket
error. Instead of using the socket, this extension uses the phpredis to connect to redis server, and all classes and methods has save input and output as the original extension.
Yii 原始的 yiisoft/yii2-redis 扩展使用 socket 进行通信,在高并发下有性能问题,响应时间较长,并且会出现 Failed to read from socket
错误。
本扩展在原有 yii2-redis 的基础上,将连接方式替换为使用 php 原生扩展 phpredis/phpredis,性能大幅提高的同时,保持与原有扩展相同的调用方法方式,支持 Cache/Session/ActiveRecord,仅需替换对应类即可。
php composer.phar require --prefer-dist bootell/yii2-phpredis:"*"
return [
//....
'components' => [
'redis' => [
'class' => 'bootell\redis\Connection',
'hostname' => 'localhost',
'port' => 6379,
'database' => 0,
],
]
];
retries
,但可配置重试间隔 retry_interval
;此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。