小编Don*_*ndi的帖子

Doctrine用密码连接到redis

听起来很简单,但它让我连续几个小时.

如何使用密码连接到redis缓存服务器.它在没有密码的情况下成功连接和缓存了学说查询,但是当我输入密码时,它会抛出异常

InvalidConfigurationException in ArrayNode.php line 309:
Unrecognized option "password" under "doctrine.orm.entity_managers.default.query_cache_driver"
Run Code Online (Sandbox Code Playgroud)

我尝试了一个组合,但我目前的代码是config.yml .....

    entity_managers:
        default:
            metadata_cache_driver: apc
            query_cache_driver:
                type: redis
                host: localhost
                port: 6379
#                password: myStr0nG!passw0rd - adding this causes exception
                instance_class: Redis
            result_cache_driver:
                type: redis
                host: localhost
                port: 6379
#                password: myStr0nG!passw0rd - adding this causes exception
                instance_class: Redis
Run Code Online (Sandbox Code Playgroud)

php caching redis symfony doctrine-orm

1
推荐指数
1
解决办法
2266
查看次数

标签 统计

caching ×1

doctrine-orm ×1

php ×1

redis ×1

symfony ×1