We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

phpredis and phalcon/////redis

As I understand it, Falcon methods in working with redis quite limited. Please tell me how to register redis (phpredis) as a service and use all of its features. Is this possible? Thank you in advance! Who can faced. This is justified?



145.0k
Accepted
answer
$di->set('redis', function () {
$redis = new Redis(); // proper arguments etc stuff
return $redis
});

And in controller $this->redis or something like this.



14.4k

Thank you dear friend!