diff --git a/src/PathautoGenerator.php b/src/PathautoGenerator.php
index 6c56a5c34..3ced1dc90 100644
--- a/src/PathautoGenerator.php
+++ b/src/PathautoGenerator.php
@@ -165,8 +165,9 @@ public function createEntityAlias(EntityInterface $entity, $op) {
       'bundle' => $entity->bundle(),
       'language' => &$langcode,
     );
-    // @todo Is still hook still useful?
+    $pattern_original = $pattern->getPattern();
     $this->moduleHandler->alter('pathauto_pattern', $pattern, $context);
+    $pattern_altered = $pattern->getPattern();
 
     // Special handling when updating an item which is already aliased.
     $existing_alias = NULL;
@@ -236,7 +237,15 @@ public function createEntityAlias(EntityInterface $entity, $op) {
       'language' => $langcode,
     );
 
-    return $this->aliasStorageHelper->save($path, $existing_alias, $op);
+    $return  = $this->aliasStorageHelper->save($path, $existing_alias, $op);
+
+    // Because there is no way to set an altered pattern to not be cached,
+    // change it back to the original value.
+    if ($pattern_altered !== $pattern_original) {
+      $pattern->setPattern($pattern_original);
+    }
+
+    return $return;
   }
 
   /**
