Symfony应用程序中

时间:2017-08-26 18:00:38

标签: symfony doctrine-orm

Doctrine缓存驱动程序扩展Doctrine\Common\Cache\CacheProvider,允许设置缓存命名空间。

如果配置二级缓存如下:

second_level_cache:
    enabled: true
    log_enabled: true
    region_cache_driver:
        type: apcu

它将使用Doctrine\Common\Cache\ApcuCache作为缓存驱动程序。 ApcuCache扩展了Doctrine\Common\Cache\CacheProvider

在Symphony中配置Doctrine缓存的最佳方法是什么,以便我可以访问缓存驱动程序,以便我可以动态更改命名空间?

configuration options,例如:

second_level_cache:
    region_cache_driver:
        type:                 array
        host:                 ~
        port:                 ~
        instance_class:       ~
        class:                ~
        id:                   ~
        namespace:            ~
        cache_provider:       ~
    region_lock_lifetime: 60
    log_enabled:          true
    region_lifetime:      0
    enabled:              true
    factory:              ~

没有详细记录。

我是否可以创建新服务并通过上述配置连接它?

如何使用class:cache_provider:instance_class:

0 个答案:

没有答案