src/Viserio/Component/Profiler/Provider/ProfilerPsr6Psr16CacheBridgeServiceProvider.php
public static function extendCacheItemPool(
        ContainerInterface $container,
        ?CacheItemPoolInterface $cache = null
    ): ?CacheItemPoolInterface {
        if ($cache !== null) {
            if ($cache instanceof PhpCachePoolInterface) {
                return new PhpCacheTraceableCacheDecorator($cache);
            }

            return new TraceableCacheItemDecorator($cache);
        }

        return $cache;
    }
public static function extendCacheItemPool(
        ContainerInterface $container,
        ?CacheItemPoolInterface $cache = null
    ): ?CacheItemPoolInterface {
        if ($cache !== null) {
            if ($cache instanceof PhpCachePoolInterface) {
                return new PhpCacheTraceableCacheDecorator($cache);
            }

            return new TraceableCacheItemDecorator($cache);
        }

        return $cache;
    }
Decorate CacheItemPool instances.

@param \Psr\Container\ContainerInterface      $container
@param null|\Psr\Cache\CacheItemPoolInterface $cache

@return null|\Psr\Cache\CacheItemPoolInterface