2016-08-15 38 views
3

Config.yml:Symfony的3.1 PSR-6缓存设置

cache: 
    app: cache.adapter.doctrine 
    system: cache.adapter.doctrine 
    default_doctrine_provider: ~ 
    default_psr6_provider: ~ 
    default_redis_provider: "redis://localhost:6379" 

Symfony的3.1支持的学说缓存,但你没有足够的文档。

缓存组件: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:?我怎么进入的供应商

回答

2

可以传递到default_doctrine_provider无论是Redis的连接DSN(例如“redis的://127.0.0.1:6379”)或ID,它实现Symfony\Component\Cache\Adapter\AdapterInterface

你可以有一个服务看已经实现的适配器here