<p dir="auto"><strong>Description</strong><br>
Cache pools can easily be configured in the framework bundle with</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="framework:
    cache:
        pools:
            cache.pool1:
                adapter: cache.adapter.redis
            cache.pool2:
                adapter: cache.adapter.redis"><pre class="notranslate"><code class="notranslate">framework:
    cache:
        pools:
            cache.pool1:
                adapter: cache.adapter.redis
            cache.pool2:
                adapter: cache.adapter.redis
</code></pre></div>
<p dir="auto">But all the cache services created only implement PSR-6  <code class="notranslate">Psr\Cache\CacheItemPoolInterface</code>. We would like to use PSR-16 <code class="notranslate">Psr\SimpleCache\CacheInterface</code> instead. Currently the only solution seems to be to wrap all the pools in an adapter like</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="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']"><pre class="notranslate"><code class="notranslate">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']
</code></pre></div>
<p dir="auto">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:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="framework:
    cache:
        pools:
            cache.pool1:
                adapter: cache.adapter.redis
                simple: true
            cache.pool2:
                adapter: cache.adapter.redis
                simple: true"><pre class="notranslate"><code class="notranslate">framework:
    cache:
        pools:
            cache.pool1:
                adapter: cache.adapter.redis
                simple: true
            cache.pool2:
                adapter: cache.adapter.redis
                simple: true
</code></pre></div>
<p dir="auto">What do you think about deprecating the <code class="notranslate">Date</code> and <code class="notranslate">Time</code> constraints in favor of add a <code class="notranslate">format</code> option to the <code class="notranslate">DateTime</code> constraint.<br>
We can do that using the <code class="notranslate">DateTime::createFromFormat()</code> and <code class="notranslate">DateTime::getLastErrors()</code> to check if a date is valid based on a specific format.<br>
What do you think? Can be this discussed?</p>