【问题标题】:Symfony 5 Cache Component AWS elasticache invalid DSNSymfony 5 缓存组件 AWS elasticache 无效 DSN
【发布时间】: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


【解决方案1】:

已解决问题,与此问题无关。但要确保必须安装 predis 扩展。

【讨论】:

    猜你喜欢
    • 2019-03-22
    • 1970-01-01
    • 2012-12-28
    • 1970-01-01
    • 2018-05-06
    • 2020-05-19
    • 2020-06-25
    • 1970-01-01
    • 2019-03-24
    相关资源
    最近更新 更多