services() ->set('twig.extension.cache', CacheExtension::class) ->tag('twig.extension') ->set('twig.runtime.cache', CacheRuntime::class) ->args([ $service('twig.cache'), ]) ->tag('twig.runtime') ->set('twig.cache', TagAwareAdapter::class) ->args([ $service('.twig.cache.inner'), ]) ->set('.twig.cache.inner') ->parent('cache.app') ->tag('cache.pool', ['name' => 'twig.cache']) ->alias(TagAwareCacheInterface::class.' $twigCache', 'twig.cache') ->alias(CacheInterface::class.' $twigCache', '.twig.cache.inner') ->alias(CacheItemPoolInterface::class.' $twigCache', '.twig.cache.inner') ; };