【发布时间】:2021-05-11 21:15:47
【问题描述】:
由于没有任何相关的帖子,有没有人发生过,在使用symfony缓存组件和使用AWS ElasitCache Redis集群时,在使用提供的端点时发生了这种错误:
the option "dsn" with value "{redis-dsn}" is invalid
dsn:redis://{aws-redis-uri}:6379
cache.yaml 看起来像这样:
framework:
cache:
pools:
status.cache:
adapter: cache.app
redis.cache:
adapter: cache.adapter.redis
provider: '%env(REDIS_URL)%'
引发错误的动作:
$client = RedisAdapter::createConnection(
$_ENV['REDIS_URL'],
[
'timeout' => 3,
'persistent' => 1,
]
);
【问题讨论】:
-
您可以尝试在 dsn 中对“{aws-redis-uri}”进行 url 编码吗?
标签: php amazon-web-services symfony redis amazon-elasticache