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缓存的最佳方法是什么,以便我可以访问缓存驱动程序,以便我可以动态更改命名空间?
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:
?