-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Cache] TLS support on RedisTrait #40224
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
Comments
which RedisTrait are you talking about ? We have support for Redis in multiple components |
OK, this is in symfony/cache, because the initial merged PR was incomplete (which I reported back then, but I looked at it only at the time of being merged): #30605 |
Might be fixed by #39599? |
Thank you Nicolas. It seems to be treated by this PR but still not merged. I try to create a custom "app.redis_provider" but don't find any documention. I want to use my extended RedisAdapter, which init my own \Redis|\RedisArray|\RedisCluster|\Predis\ClientInterface and use it on cache.yaml configuration |
I did this <?php
namespace App\Cache;
use Predis\Client;
use Symfony\Component\Cache\Adapter\RedisAdapter;
use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface;
class RedisCacheAdapter extends RedisAdapter
{
public function __construct(
ParameterBagInterface $parameterBag
) {
$redisScheme = $parameterBag->get('redis_scheme');
$redisHost = $parameterBag->get('redis_host');
$redisPort = $parameterBag->get('redis_port');
$redisKey = $parameterBag->get('redis_key');
$client = new Client(
[
'scheme' => $redisScheme,
'host' => $redisHost,
'port' => $redisPort,
'password' => $redisKey
]
);
parent::__construct($client);
}
} and override cache.app in service.yaml services:
cache.app:
class: App\Cache\RedisCacheAdapter
arguments:
- '' # i don't know why |
Hello,
rediss:// DSL scheme is for TLS connexion to Redis Server.
You support rediss keyword but not TLS connexion.
https://github.com/predis/predis
https://github.com/phpredis/phpredis
When i use rediss:// scheme, the Redis connection still use tcp scheme.
The text was updated successfully, but these errors were encountered: