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

            return new SimpleTraceableCacheDecorator($cache);
        }

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

            return new SimpleTraceableCacheDecorator($cache);
        }

        return $cache;
    }
Decorate SimpleTraceableCache instances.

@param \Psr\Container\ContainerInterface    $container
@param null|\Psr\SimpleCache\CacheInterface $cache

@return null|\Psr\SimpleCache\CacheInterface