# Override Config Cache in YAML
Most Symfony projects are still using YAML to define their services. You can override the config cache strategy in YAML:
# config/services.yaml
easy_notification.config_cache:
class: Symfony\Component\Cache\Adapter\PhpFilesAdapter
arguments:
$namespace: 'eonx_notification_config'
# Override Config Cache in PHP
If your Symfony project is using PHP to define its services, the service id to override is provided to you via
a constant on EonX\EasyNotification\Bridge\BridgeConstantsInterface
.
// config/services.php
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
use EonX\EasyNotification\Bridge\BridgeConstantsInterface;
use Symfony\Component\Cache\Adapter\PhpFilesAdapter;
return static function (ContainerConfigurator $container): void {
$services = $container->services();
$services
->set(BridgeConstantsInterface::SERVICE_CONFIG_CACHE, PhpFilesAdapter::class)
->arg('$namespace', 'eonx_notification_config');
};
← Symfony Laravel/Lumen →