src/DependencyInjection/AnimeDbCacheTimeKeeperExtension.php
protected function mergeDefaultConfig(array $config, ContainerBuilder $container)
    {
        $config = array_merge([
            'enable' => true,
            'use_driver' => 'file',
            'private_headers' => ['Authorization', 'Cookie'],
            'etag_hasher' => [],
            'track' => [],
            'drivers' => [],
        ], $config);

        $config['etag_hasher'] = array_merge([
            'driver' => 'cache_time_keeper.cache_key_builder.default_etag_hasher',
            'algorithm' => 'sha256',
        ], $config['etag_hasher']);

        $config['track'] = array_merge([
            'clear_cache' => true,
            'individually_entity' => false,
        ], $config['track']);

        $config['drivers'] = array_merge([
            'multi' => [
                'fast' => 'shmop',
                'slow' => 'file',
            ],
            'shmop' => [
                'salt' => $container->getParameter('cache_time_keeper.driver.shmop.salt'),
            ],
            'file' => [
                'path' => $container->getParameter('cache_time_keeper.driver.file.path'),
            ],
            'memcache' => [
                'prefix' => 'cache_time_keeper_',
                'hosts' => [],
            ],
        ], $config['drivers']);

        return $config;
    }
protected function mergeDefaultConfig(array $config, ContainerBuilder $container)
    {
        $config = array_merge([
            'enable' => true,
            'use_driver' => 'file',
            'private_headers' => ['Authorization', 'Cookie'],
            'etag_hasher' => [],
            'track' => [],
            'drivers' => [],
        ], $config);

        $config['etag_hasher'] = array_merge([
            'driver' => 'cache_time_keeper.cache_key_builder.default_etag_hasher',
            'algorithm' => 'sha256',
        ], $config['etag_hasher']);

        $config['track'] = array_merge([
            'clear_cache' => true,
            'individually_entity' => false,
        ], $config['track']);

        $config['drivers'] = array_merge([
            'multi' => [
                'fast' => 'shmop',
                'slow' => 'file',
            ],
            'shmop' => [
                'salt' => $container->getParameter('cache_time_keeper.driver.shmop.salt'),
            ],
            'file' => [
                'path' => $container->getParameter('cache_time_keeper.driver.file.path'),
            ],
            'memcache' => [
                'prefix' => 'cache_time_keeper_',
                'hosts' => [],
            ],
        ], $config['drivers']);

        return $config;
    }
@param array $config
@param ContainerBuilder $container

@return array