Skip to content

Commit

Permalink
Cache needs to clear on 4G/5G organization switch (#574)
Browse files Browse the repository at this point in the history
* Based on 4G/5G switch of the organization, cache needs to clear

Co-authored-by: Hirenkumar Parmar <[email protected]>
  • Loading branch information
divya-intelli and phdhiren authored Apr 19, 2021
1 parent 4caa7c2 commit 3829644
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/KeyEntityFormEnhancer.php
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,9 @@ public function validateForm(array &$form, FormStateInterface $form_state): void
// Test the connection.
$this->connector->testConnection($test_key);
$this->messenger()->addStatus($this->t('Connection successful.'));

// Based on type of organization, cache needs to clear.
drupal_flush_all_caches();
}
catch (\Exception $exception) {
watchdog_exception('apigee_edge', $exception);
Expand Down
1 change: 1 addition & 0 deletions src/Plugin/KeyInput/ApigeeAuthKeyInput.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ public function processSubmittedKeyValue(FormStateInterface $form_state) {

// Reset values to just `key_value`.
$form_state->setValues(['key_value' => Json::encode(array_filter($input_values))]);

return parent::processSubmittedKeyValue($form_state);
}

Expand Down

0 comments on commit 3829644

Please sign in to comment.