By default, Laravel will use the phpredis extension to communicate with Redis but We can install predis in application.
do I need to install predis in project? what is difference between phpredis and predis in laravel?
By default, Laravel will use the phpredis extension to communicate with Redis but We can install predis in application.
do I need to install predis in project? what is difference between phpredis and predis in laravel?
2
Answers
phpredis is a binary package and pecl extension for php.which makes it faster than predis.
but you need root permission to install phpredis extension.when you use some webhost that do not support customize environment,make it impossible to run you appllication.
on the other hand.predis use pure php code to communicate with redis server.so there is no local php extension requirements.but it’s a little slower.
so you can deploy you application to any webhost that support php.
As I remember.laravel default use predis to make it minial requirements.
PhpRedis is a PHP extension for communicating with the Redis storage.
Predis is the alternative for PhpRedis on pure PHP and does not require any additional C extension by default, but it can be optionally paired with phpiredis.
I will recommend that phpredis provide a lot of better performance.