php - Symfony 3.1 PSR-6 Caching Settings



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

Symfony 3.1 support doctrine cache, but you do not have enough documentation.

Cache Component:
Supported drives:
Symfony Integration:

default_doctrine_provider: ? What do I enter as Provider




You can pass todefault_doctrine_provider either a Redis connection DSN (for example "redis://") or ID of a service which implementsSymfony\Component\Cache\Adapter\AdapterInterface

You can have a look at already implemented adapters here




The provider basically is the originaldoctrine_cache provider you configured. Let's say you use theDoctrineCacheBundle and your provider name ismy_apc_cache that means the container has the following service:

$myCache = $this->container->get('doctrine_cache.providers.my_apc_cache');

You could also define an alias, then it is even easier.

Take a look at the example at:

People are also looking for solutions to the problem: Comparing two dates in different month return nothing in PHP


Didn't find the answer?

Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.

Ask a Question

Write quick answer

Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.

Similar questions

Find the answer in similar questions on our website.