-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model Caching gives Class 'Redis' not found when Laravel Scout is importing #367
Comments
@binotm25 Please provide the full stack trace from the log file. |
Thanks for the fast update, here is the complete stack trace:
|
This does not appear to be an error with this package. Please be sure to install the appropriate Redis client according to Laravel's documentation: https://laravel.com/docs/6.x/redis#phpredis. Have you done that already? |
Yes, I already have done that. It works perfectly fine with this package, I can see the cache model records in the Redis also. It only crashes when I do the scout import, or save when the scout searchable trait is used on the model.
This also works. I will also open a new issue on scout as well. |
@binotm25 Thanks for following up! Would you be able to set up a test repo with code that fails and short instructions on how to trigger the failing code? That would help tremendously. Thanks! I have never gotten this error when using Scout in combination with this package. |
Oops my bad. Turns out the phpredis was not working from cli although it was working fine with the nginx and php-fpm. Upon close inspection the redis.ini wasn't imported into the php cli folder. After importing it, it is working perfectly. Thank you so much for this package. Sorry I couldn't figured it out earlier. |
Awesome that you got it working! :) |
Describe the bug
Model caching works fine with phpredis as the client. But when I use Laravel scout to import data to its index it gives Redis not found error. When I disabled the Cachable trait the import works fine.
php artisan scout:import "App\Models"
Stack Trace
Class 'Redis' not found
at vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:74
Environment
The text was updated successfully, but these errors were encountered: