Bypass filesystem cache in debug mode.

This commit is contained in:
David Molineus
2017-10-17 17:09:00 +02:00
parent 0abc4676f1
commit 50465e4026
2 changed files with 8 additions and 3 deletions

View File

@@ -49,5 +49,13 @@ class NetzmachtContaoLeafletExtension extends Extension
$loader->load('mappers.yml'); $loader->load('mappers.yml');
$loader->load('encoders.yml'); $loader->load('encoders.yml');
$loader->load('layers.yml'); $loader->load('layers.yml');
if (!$container->hasDefinition('netzmacht.contao_leaflet.cache')) {
if ($container->getParameter('kernel.debug')) {
$container->setAlias('netzmacht.contao_leaflet.cache', 'netzmacht.contao_leaflet.cache.debug');
} else {
$container->setAlias('netzmacht.contao_leaflet.cache', 'netzmacht.contao_leaflet.cache.default');
}
}
} }
} }

View File

@@ -26,9 +26,6 @@ services:
arguments: arguments:
- '%netzmacht.contao_leaflet.filters%' - '%netzmacht.contao_leaflet.filters%'
netzmacht.contao_leaflet.cache:
alias: 'netzmacht.contao_leaflet.cache.default'
netzmacht.contao_leaflet.cache.default: netzmacht.contao_leaflet.cache.default:
class: Doctrine\Common\Cache\FilesystemCache class: Doctrine\Common\Cache\FilesystemCache
arguments: arguments: