Wietse
19. Oktober 2017 um 08:29
1
Dear all,
We are trying to enable redis caching using the following manual:
https://developers.shopware.com/developers-guide/shopware-config/#redis-configuration
This is a shared hosting server and therefore there are multiple redis instances that use authentication:
The manual is not clear about how we should add the redis auth password. Is this possible at the moment?
Best regards
Wietse D.
Thomas
22. Oktober 2017 um 20:21
2
Hey,
at the moment it seems to me that is not possible. I created a pull request to implement this. Please have a look into it: support redis auth in createRedisCacheProvider by teiling88 · Pull Request #1329 · shopware/shopware · GitHub
Greetings
Wietse
9. November 2017 um 16:11
3
Hello Thomas,
Thank you for looking into this.
As this version is not released yet i tried adding your lines from the git to the latest version and edited the config.php
'model' => [
'redisHost' => '127.0.0.1',
'redisPort' => 6379,
'redisDbIndex' => 0,
'cacheProvider' => 'redis',
'redisAuth' => 'ditiseentopsecretpassword'
],
'cache' => [
'backend' => 'redis', // e.G auto, apcu, xcache
'backendOptions' => [
'servers' => array(
array(
'host' => '127.0.0.1',
'port' => 6379,
'dbindex' => 0,
'redisAuth' => 'ditiseentopsecretpassword'
),
),
],
]
This give me a zend error in redis.php (NOAUTH required) . I did a quick hack to enable redis auth here:
$this->_redis->auth($server[‘redisAuth’]); just before
111 if ($result)
112 $this->_redis->select($server['dbindex']);
113 else
114 $this->_redis = null;
115 }
This makes it working. I just wanted to let you know the zend libraries need an update to. But maybe you already knew this.
Best regards.
Wietse
Thomas
10. November 2017 um 09:27
4
@Wietse schrieb:
This makes it working. I just wanted to let you know the zend libraries need an update to. But maybe you already knew this.
Thank you for your testing. I checked it only with the Model Cache implementation. I allready created an internal Pull Request for this. Should be available in the next hours on github too.