symfony - 带有 phpfastcache 包的 Redis 驱动程序

标签 symfony redis phpfastcache

我将使用 phpfastcache-bundle使用 symfony3。我找到了如何将其与文件驱动程序一起使用的文档。但是其他驱动程序的文档很差。我如何使用 symfony 设置 redis 驱动程序?

最佳答案

抱歉来晚了

Wiki 有一个 page对于驱动程序的所有选项。您可以在 Host/Authenticating options 中找到 redis 的选项。

symfony 包中的驱动配置与库完全相同,只是它们是 yaml 格式的。所以,如果你想设置 redis:

php_fast_cache:
    drivers:
        redis:
            type: Redis
            parameters: ~

这里的参数是默认的,但您可以使用 wiki 中指定部分的选项更改它。

如果 wiki 中的参数不是实际的,您可以在供应商文件夹中找到所有选项 - vendor\phpfastcache\phpfastcache\src\phpFastCache\Drivers\Redis\Driver.php#driverConnect

关于symfony - 带有 phpfastcache 包的 Redis 驱动程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45326169/

相关文章:

Php Redis 在 Sets 中添加值而不排序

php - 当我从缓存中获取时,fetch 只返回一行

symfony - 基于主机的错误页面

php - Symfony 2.3 添加 Google API

forms - 在 Symfony2 表单中插入 Google Recaptcha

用于缓存数据集的 phpfastcache

phpfastcache V6 + redis - 可以设置前缀吗?

Symfony FOSOAuthServerBundle : access token not detected

spring-boot - RedisMessageListenerContainer : Connection failure occurred. 5000 毫秒后重新启动订阅任务

mysql - 使用 Nginx 代理 TCP 流(MySQL 和 Redis)