带有 phpfastcache 包的 Redis 驱动程序

Redis driver with phpfastcache bundle

我将 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 文件夹中找到所有选项 - vendor\phpfastcache\phpfastcache\src\phpFastCache\Drivers\Redis\Driver.php#driverConnect