Description
Cache pools can easily be configured in the framework bundle with
framework:
cache:
pools:
cache.pool1:
adapter: cache.adapter.redis
cache.pool2:
adapter: cache.adapter.redis
But all the cache services created only implement PSR-6 Psr\Cache\CacheItemPoolInterface. We would like to use PSR-16 Psr\SimpleCache\CacheInterface instead. Currently the only solution seems to be to wrap all the pools in an adapter like
services:
cache.simple.pool1:
class: Symfony\Component\Cache\Simple\Psr6Cache
arguments: ['@cache.pool1']
cache.simple.pool2
class: Symfony\Component\Cache\Simple\Psr6Cache
arguments: ['@cache.pool2']
This is quite cumbersome as we have alot of pools. It would be nice if the framework bundle provides a way to use SimpleCache directly. Maybe something like the following would create PSR-16 caches instead:
framework:
cache:
pools:
cache.pool1:
adapter: cache.adapter.redis
simple: true
cache.pool2:
adapter: cache.adapter.redis
simple: true
Description
Cache pools can easily be configured in the framework bundle with
But all the cache services created only implement PSR-6
Psr\Cache\CacheItemPoolInterface. We would like to use PSR-16Psr\SimpleCache\CacheInterfaceinstead. Currently the only solution seems to be to wrap all the pools in an adapter likeThis is quite cumbersome as we have alot of pools. It would be nice if the framework bundle provides a way to use SimpleCache directly. Maybe something like the following would create PSR-16 caches instead: