Closed tanjhysj0 closed 3 years ago
Shouldn't it be Yii::$app->redis->set("key","value", ['nx', 'ex', '1'])
?
Thank you for your question. In order for this issue tracker to be effective, it should only contain bug reports and feature requests.
We advise you to use our community driven resources:
If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.
This is an automated comment, triggered by adding the label question
.
代码如下
Yii::$app->redis->set("key","value",['nx','ex'=>1])
本来原生redis是完全可以这样执行的,就是实现setnx的同时来设置过期时间,但是在这里却招到了拒绝message:mb_strlen() expects parameter 1 to be string,array give in common\\extension\\redis\\Connection.php:101