create(self::class); $path = $prefix ? Helper::PREFIX . '/' . $path : $path; $configSetter->setConfigValue($path, $value); // Clean cache old $cacheManager = $objectManager->get(\Magento\Framework\App\Cache\Manager::class); $cacheManager->flush(['config']); } public function __construct(WriterInterface $configWriter) { $this->configWriter = $configWriter; } public function setConfigValue($fullPath, $value) { $this->configWriter->save($fullPath, $value); } }