ai-cache class redis not found
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 2
- Joined: 10 Jul 2023, 20:02
ai-cache class redis not found
Hello there..
Currently using:
Laravel 10.14.1
Aimeos 2023.07.1
ai-cache 2023.04.1
PHP 8.2
Ubuntu 22.04
I just installed a fresh Aimeos, and then followed by installing redis-server (added requirepass). And then I installed ai-cache ( https://github.com/aimeos/ai-cache ).
/config/shop.php :
Afterwards, I checked through redis-cli if any keys are registered when I open a product/page in the site. Since I don't see any new keys added, I assume ai-cache is NOT working yet (please correct me if I'm wrong). So based on another thread here, I added the following in /config/shop.php:
Afterwards, when I run "php artisan aimeos:clear", I got the following error message:
So I have two questions:
1. Can anybody please let me know if I've made any mistake during installation process for ai-cache?
2. Can anybody tell me how to check if ai-cache is already working as intended?
Thanks in advance!
Currently using:
Laravel 10.14.1
Aimeos 2023.07.1
ai-cache 2023.04.1
PHP 8.2
Ubuntu 22.04
I just installed a fresh Aimeos, and then followed by installing redis-server (added requirepass). And then I installed ai-cache ( https://github.com/aimeos/ai-cache ).
/config/shop.php :
Code: Select all
return [
...
'resource' => [
...
'cache' => [
'redis' => [
'scheme' => 'tcp',
'host' => '127.0.0.1',
'port' => 6379,
'password' => 'blahblah',
],
],
],
];
Code: Select all
return [
...
'madmin' => [
'cache' => [
'manager' => [
'name' => 'redis',
],
],
],
];
Code: Select all
LogicException
Class "\Aimeos\MAdmin\Cache\Manager\redis" not found
at vendor/aimeos/aimeos-core/src/Utils.php:20
So I have two questions:
1. Can anybody please let me know if I've made any mistake during installation process for ai-cache?
2. Can anybody tell me how to check if ai-cache is already working as intended?
Thanks in advance!
Re: ai-cache class redis not found
First, you need a package version that matches the Aimeos version, i.e. "2023.07.x" in your case:
Then, the name of the manager name must be in upper case:
Code: Select all
composer req aimeos/ai-cache:2023.07.*
Code: Select all
return [
'madmin' => [
'cache' => [
'manager' => [
'name' => 'Redis',
],
],
],
];
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

-
- Posts: 2
- Joined: 10 Jul 2023, 20:02
Re: ai-cache class redis not found
Thanks for the reply. I've tried doing these 2 points, and I got a different error message now when running "php artisan aimeos:clear" :
I assume this is because I use requirepass in redis.conf, so I try removing the password, and no more error message. BUT when I open shop page, or admin page, there are still no new keys created in the redis database. So I'm still not 100% sure if ai-cache is indeed working or not.
So my questions are:
1. If I want to add a password to redis, what config should I add?
2. How do I test if ai-cache is working properly?
Thanks in advance!
Code: Select all
Predis\Response\ServerException
NOAUTH Authentication required.
at vendor/predis/predis/src/Client.php:370
So my questions are:
1. If I want to add a password to redis, what config should I add?
2. How do I test if ai-cache is working properly?
Thanks in advance!
Re: ai-cache class redis not found
The Predis library contains not much information about password authentication but it seems you need "username" AND "password": https://github.com/predis/predis#connecting-to-redis
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,
