From dab973e0f33f04885f2258e04aeb6bcc7713914d Mon Sep 17 00:00:00 2001 From: Timo Welde Date: Mon, 14 May 2018 19:02:24 +0200 Subject: [PATCH] INREL-3903 / INREL-2839: manual acquia purge cache flushing not needed anymore. Second time, to use as patch --- .../infinite_taxonomy.module | 26 ------------------- 1 file changed, 26 deletions(-) diff --git a/modules/infinite_taxonomy/infinite_taxonomy.module b/modules/infinite_taxonomy/infinite_taxonomy.module index 37a6444..4f2f16b 100644 --- a/modules/infinite_taxonomy/infinite_taxonomy.module +++ b/modules/infinite_taxonomy/infinite_taxonomy.module @@ -34,29 +34,3 @@ function infinite_taxonomy_entity_base_field_info(EntityTypeInterface $entity_ty return $fields; } } - -/** - * @param Term $term - */ -function infinite_taxonomy_taxonomy_term_update(Term $term) { - /** @var HostingInfo $hostingInfo */ - $hostingInfo = \Drupal::service('acquia_purge.hostinginfo'); - $site = $hostingInfo->getSiteIdentifier(); - $url = Url::fromRoute('entity.taxonomy_term.canonical', ['taxonomy_term' => $term->id()]) - ->setAbsolute(true) - ->toString(); - $command = sprintf( - 'curl -X PURGE -H "X-Acquia-Purge:%s" -H "Accept-Encoding: gzip" %s', - $site, - $url - ); - $process = new Process($command); - $process->run(); - if (false === $process->isSuccessful()) { - drupal_set_message(sprintf( - 'Unable to clear varnish cache for url %s on site %s', - $url, - $site - ), 'error'); - } -} \ No newline at end of file