配置.yml:
cache:
app: cache.adapter.doctrine
system: cache.adapter.doctrine
default_doctrine_provider: ~
default_psr6_provider: ~
default_redis_provider: "redis://localhost:6379"
Symfony 3.1 支持 doctrine 缓存,但是你没有足够的文档。
缓存组件:http://symfony.com/doc/current/components/cache.html
支持的驱动器:http://symfony.com/doc/current/components/cache/cache_pools.html
Symfony 集成:http://symfony.com/blog/new-in-symfony-3-1-cache-component
default_doctrine_provider:?我作为提供者输入什么
最佳答案
您可以将 Redis 连接 DSN(例如“redis://127.0.0.1:6379”)或实现 Symfony\Component\Cache 的服务 ID 传递给
default_doctrine_provider
\Adapter\AdapterInterface
您可以查看已实现的适配器 here
关于php - Symfony 3.1 PSR-6 缓存设置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38952124/