Loading cloudfront_edge_caching.info.yml +2 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ name: Cloudfront Edge Caching type: module description: Invalidate cache pages in Amazon Cloudfront package: Services core: 8.x # core: 8.x core_version_requirement: ^8 || ^9 configure: cec.admin dependencies: cloudfront_edge_caching.module +2 −2 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ function cloudfront_edge_caching_entity_update(EntityInterface $entity) { $entity_type = $entity->getEntityTypeId(); if ($enable_auto_clear_cache_content['cec_auto_cache'] && $entity_type == 'node') { $path_url = \Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $entity->id()); $path_url = \Drupal::service('path_alias.manager')->getAliasByPath('/node/' . $entity->id()); // Test connection. $test_connection_cec = cloudfront_edge_caching_test_connection($config->get('cec_region'), $config->get('cec_key'), $config->get('cec_secret')); Loading @@ -52,7 +52,7 @@ function cloudfront_edge_caching_entity_update(EntityInterface $entity) { } } elseif ($enable_auto_clear_cache_users['cec_auto_cache'] && $entity_type == 'user') { $path_url = \Drupal::service('path.alias_manager')->getAliasByPath('/user/' . $entity->id()); $path_url = \Drupal::service('path_alias.manager')->getAliasByPath('/user/' . $entity->id()); // Test connection. $test_connection_cec = cloudfront_edge_caching_test_connection($config->get('cec_region'), $config->get('cec_key'), $config->get('cec_secret')); Loading src/Form/CecAdminInvalidateUrl.php +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ class CecAdminInvalidateUrl extends ConfigFormBase { // Check if the credentials are configured. if (!$config->get('cec_region' && !$config->get('cec_key') && !$config->get('cec_secret'))) { drupal_set_message($this->t('You must configure the Global Settings correctly before execute an invalidation.'), 'error'); $this->messenger()->addError($this->t('You must configure the Global Settings correctly before execute an invalidation.'), 'error'); } else { Loading @@ -97,10 +97,10 @@ class CecAdminInvalidateUrl extends ConfigFormBase { list($status, $message) = cloudfront_edge_caching_invalidate_url($paths); if ($status == TRUE) { drupal_set_message($this->t('You invalidation is in progress.'), 'status'); $this->messenger()->addStatus($this->t('You invalidation is in progress.'), 'status'); } else { drupal_set_message($this->t($message), 'error'); $this->messenger()->addError($this->t($message), 'error'); } } } Loading Loading
cloudfront_edge_caching.info.yml +2 −1 Original line number Diff line number Diff line Loading @@ -2,6 +2,7 @@ name: Cloudfront Edge Caching type: module description: Invalidate cache pages in Amazon Cloudfront package: Services core: 8.x # core: 8.x core_version_requirement: ^8 || ^9 configure: cec.admin dependencies:
cloudfront_edge_caching.module +2 −2 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ function cloudfront_edge_caching_entity_update(EntityInterface $entity) { $entity_type = $entity->getEntityTypeId(); if ($enable_auto_clear_cache_content['cec_auto_cache'] && $entity_type == 'node') { $path_url = \Drupal::service('path.alias_manager')->getAliasByPath('/node/' . $entity->id()); $path_url = \Drupal::service('path_alias.manager')->getAliasByPath('/node/' . $entity->id()); // Test connection. $test_connection_cec = cloudfront_edge_caching_test_connection($config->get('cec_region'), $config->get('cec_key'), $config->get('cec_secret')); Loading @@ -52,7 +52,7 @@ function cloudfront_edge_caching_entity_update(EntityInterface $entity) { } } elseif ($enable_auto_clear_cache_users['cec_auto_cache'] && $entity_type == 'user') { $path_url = \Drupal::service('path.alias_manager')->getAliasByPath('/user/' . $entity->id()); $path_url = \Drupal::service('path_alias.manager')->getAliasByPath('/user/' . $entity->id()); // Test connection. $test_connection_cec = cloudfront_edge_caching_test_connection($config->get('cec_region'), $config->get('cec_key'), $config->get('cec_secret')); Loading
src/Form/CecAdminInvalidateUrl.php +3 −3 Original line number Diff line number Diff line Loading @@ -81,7 +81,7 @@ class CecAdminInvalidateUrl extends ConfigFormBase { // Check if the credentials are configured. if (!$config->get('cec_region' && !$config->get('cec_key') && !$config->get('cec_secret'))) { drupal_set_message($this->t('You must configure the Global Settings correctly before execute an invalidation.'), 'error'); $this->messenger()->addError($this->t('You must configure the Global Settings correctly before execute an invalidation.'), 'error'); } else { Loading @@ -97,10 +97,10 @@ class CecAdminInvalidateUrl extends ConfigFormBase { list($status, $message) = cloudfront_edge_caching_invalidate_url($paths); if ($status == TRUE) { drupal_set_message($this->t('You invalidation is in progress.'), 'status'); $this->messenger()->addStatus($this->t('You invalidation is in progress.'), 'status'); } else { drupal_set_message($this->t($message), 'error'); $this->messenger()->addError($this->t($message), 'error'); } } } Loading