diff --git a/DependencyInjection/Configuration.php b/DependencyInjection/Configuration.php index 75e605796..358298404 100644 --- a/DependencyInjection/Configuration.php +++ b/DependencyInjection/Configuration.php @@ -32,7 +32,7 @@ public function getConfigTreeBuilder() ->scalarNode('cache_prefix')->defaultValue('/media/cache')->end() ->scalarNode('cache')->defaultValue('web_path')->end() ->scalarNode('cache_base_path')->defaultValue('')->end() - ->booleanNode('auto_clear_cache')->defaultValue(true)->end() + ->booleanNode('cache_clearer')->defaultValue(true)->end() ->scalarNode('data_loader')->defaultValue('filesystem')->end() ->scalarNode('controller_action')->defaultValue('liip_imagine.controller:filterAction')->end() ->arrayNode('formats') diff --git a/DependencyInjection/LiipImagineExtension.php b/DependencyInjection/LiipImagineExtension.php index 5f1bd9021..2069d3073 100644 --- a/DependencyInjection/LiipImagineExtension.php +++ b/DependencyInjection/LiipImagineExtension.php @@ -25,7 +25,7 @@ public function load(array $configs, ContainerBuilder $container) $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('imagine.xml'); - if ($config['auto_clear_cache']) { + if ($config['cache_clearer']) { $loader->load('cache_clearer.xml'); } diff --git a/README.md b/README.md index a6e875597..2985c35bf 100644 --- a/README.md +++ b/README.md @@ -169,7 +169,7 @@ liip_imagine: data_root: %liip_imagine.web_root% cache_prefix: /media/cache cache: web_path - auto_clear_cache true + cache_clearer: true data_loader: filesystem controller_action: liip_imagine.controller:filterAction formats: [] @@ -213,7 +213,7 @@ There are several configuration options available: default: web_path (which means the standard web_path resolver is used) - - `auto_clear_cache` - Whether or not to clear the image cache when the `kernel.cache_clearer` event occurs. + - `cache_clearer` - Whether or not to clear the image cache when the `kernel.cache_clearer` event occurs. This option doesn't have any effect in symfony < 2.1 default: true diff --git a/Tests/DependencyInjection/LiipImagineExtensionTest.php b/Tests/DependencyInjection/LiipImagineExtensionTest.php index adf1d4a79..37c658ce3 100644 --- a/Tests/DependencyInjection/LiipImagineExtensionTest.php +++ b/Tests/DependencyInjection/LiipImagineExtensionTest.php @@ -99,7 +99,7 @@ protected function getFullConfig() web_root: ../foo/bar cache_prefix: /imagine/cache cache: false -auto_clear_cache: false +cache_clearer: false formats: ['json', 'xml', 'jpg', 'png', 'gif'] filter_sets: small: