diff --git a/core/lib/Drupal/Core/Routing/UrlGenerator.php b/core/lib/Drupal/Core/Routing/UrlGenerator.php
index 1926d44..0c85874 100644
--- a/core/lib/Drupal/Core/Routing/UrlGenerator.php
+++ b/core/lib/Drupal/Core/Routing/UrlGenerator.php
@@ -41,6 +41,13 @@ class UrlGenerator extends ProviderBasedGenerator implements UrlGeneratorInterfa
   protected $pathProcessor;
 
   /**
+   * Static cache of generated urls.
+   *
+   * @var array
+   */
+  protected $generated;
+
+  /**
    * The route processor.
    *
    * @var \Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface
@@ -376,4 +383,15 @@ protected function getRoute($name) {
     return $route;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, array $requiredSchemes = array()) {
+    $generated_key = hash('aes256', serialize(func_get_args()));
+    if (!isset($this->generated[$generated_key])) {
+      $this->generated[$generated_key] = parent::doGenerate($variables, $defaults, $requirements, $tokens, $parameters, $name, $referenceType, $hostTokens, $requiredSchemes);
+    }
+    return $this->generated[$generated_key];
+  }
+
 }
