How to set the cache driver of Symfony4's Annotations to Redis?

I"m learning that the default cache driver for Symfony,Annotation is \ Symfony\ Component\ Cache\ Adapter\ PhpArrayAdapter , and now I want to set it to \ Symfony\ Component\ Cache\ Adapter , but I don"t know how to modify it in the yaml configuration file.

official documentation describes this section as follows:

needs to create a "service id" and refer to a class that implements the Doctrine Cache interface.

how should "service id" be established here? Or how to write a configuration file?

May.18,2022

in the config/services.yaml file, under the services item, add the following service id. I use the snc_redis component here, and you can replace it with your own implementation to obtain Redis

.
app.doctrine_cache:
    class: Doctrine\Common\Cache\RedisCache
    calls:
        - ["setRedis", ["@snc_redis.cache"]]
        - ["setNamespace", ["DoctrineRedisCache"]]
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5918e-4550d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5918e-4550d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?