|
11 | 11 | use Magento\AdminAdobeIms\Model\ImsConnection;
|
12 | 12 | use Magento\AdminAdobeIms\Service\ImsCommandOptionService;
|
13 | 13 | use Magento\AdminAdobeIms\Service\ImsConfig;
|
| 14 | +use Magento\Framework\App\Cache\Type\Config; |
| 15 | +use Magento\Framework\App\Cache\TypeListInterface; |
14 | 16 | use Magento\Framework\Console\Cli;
|
15 | 17 | use Magento\Framework\Exception\InvalidArgumentException;
|
16 | 18 | use Magento\Framework\Exception\LocalizedException;
|
@@ -54,20 +56,28 @@ class AdminAdobeImsEnableCommand extends Command
|
54 | 56 | */
|
55 | 57 | private ImsCommandOptionService $imsCommandOptionService;
|
56 | 58 |
|
| 59 | + /** |
| 60 | + * @var TypeListInterface |
| 61 | + */ |
| 62 | + private TypeListInterface $cacheTypeList; |
| 63 | + |
57 | 64 | /**
|
58 | 65 | * @param ImsConfig $imsConfig
|
59 | 66 | * @param ImsConnection $imsConnection
|
60 | 67 | * @param ImsCommandOptionService $imsCommandOptionService
|
| 68 | + * @param TypeListInterface $cacheTypeList |
61 | 69 | */
|
62 | 70 | public function __construct(
|
63 | 71 | ImsConfig $imsConfig,
|
64 | 72 | ImsConnection $imsConnection,
|
65 |
| - ImsCommandOptionService $imsCommandOptionService |
| 73 | + ImsCommandOptionService $imsCommandOptionService, |
| 74 | + TypeListInterface $cacheTypeList |
66 | 75 | ) {
|
67 | 76 | parent::__construct();
|
68 | 77 | $this->imsConfig = $imsConfig;
|
69 | 78 | $this->imsConnection = $imsConnection;
|
70 | 79 | $this->imsCommandOptionService = $imsCommandOptionService;
|
| 80 | + $this->cacheTypeList = $cacheTypeList; |
71 | 81 |
|
72 | 82 | $this->setName('admin:adobe-ims:enable')
|
73 | 83 | ->setDescription('Enable Adobe IMS Module.')
|
@@ -160,6 +170,7 @@ private function enableModule(
|
160 | 170 | $testAuth = $this->imsConnection->testAuth($clientId);
|
161 | 171 | if ($testAuth) {
|
162 | 172 | $this->imsConfig->enableModule($clientId, $clientSecret, $organizationId);
|
| 173 | + $this->cacheTypeList->cleanType(Config::TYPE_IDENTIFIER); |
163 | 174 | return true;
|
164 | 175 | }
|
165 | 176 |
|
|
0 commit comments