Introduced in version 10.1
Caching has been an important success factor and that’s why we are not getting tired improving this component in TYPO3 whenever, wherever we can. Symfony’s Service Container was introduced in TYPO3 version 10.0 and this allows us now to inject cache objects directly rather than using the CacheManager.
In other words: the TYPO3 core now provides all core caches as dependency injection services and extension developers are encouraged to leverage this pattern from now on. To do this, add your cache service to the file “Configuration/Services.yaml” and dependency injection takes care of passing the cache to your class constructor. Since TYPO3 version 10.1 developers don’t need to use the “CacheManager” anymore.
Does this sound complicated? In fact, it is not: have a look at the documentation which also shows some code examples.
Documentation