How to determine if doctrine query cache working in symfony applcation

Viewed 208

Doctrine recommends to have query cache turned on on production environment, so in my prod/doctrine.yaml I have it turned on:

doctrine:
    orm:
        auto_generate_proxy_classes: false
        metadata_cache_driver:
            type: pool
            pool: doctrine.system_cache_pool
        query_cache_driver:
            type: pool
            pool: doctrine.system_cache_pool

framework:
    cache:
        pools:
            doctrine.system_cache_pool:
                adapter: cache.system


and my cache.system set up in cacge.yaml like this :

framework:
    cache:
        system: cache.adapter.filesystem

also of course I added ./bin/console doctrine:cache:clear-query -e prod to my deployment process. But I did not notice any speed improvements.

For now my cache.system adapter using filesystem. And I measure var/cache/prod size after running same endpoints with and without query cache turned on, and looks like cache size are the same, also it looks like structure of the cache the same.. I can see it's generating doctrine proxies and default_metadata.php file but I do not see any cache entries related to query cache.

Is there a way to determine that doctrine query cache working or not?

0 Answers
Related