 core/lib/Drupal/Core/Form/FormSubmitter.php | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/core/lib/Drupal/Core/Form/FormSubmitter.php b/core/lib/Drupal/Core/Form/FormSubmitter.php
index a9bd0ac..d2bab3b 100644
--- a/core/lib/Drupal/Core/Form/FormSubmitter.php
+++ b/core/lib/Drupal/Core/Form/FormSubmitter.php
@@ -7,6 +7,7 @@
 
 namespace Drupal\Core\Form;
 
+use Drupal\Core\Cache\CacheableRedirectResponse;
 use Drupal\Core\Url;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 use Symfony\Component\HttpFoundation\RequestStack;
@@ -132,19 +133,21 @@ public function redirectForm(FormStateInterface $form_state) {
     $url = NULL;
     // Check for a route-based redirection.
     if ($redirect instanceof Url) {
-      $url = $redirect->setAbsolute()->toString();
+      $url = $redirect->setAbsolute()->toString(TRUE);
     }
     // If no redirect was specified, redirect to the current path.
     elseif ($redirect === NULL) {
       $request = $this->requestStack->getCurrentRequest();
-      $url = $this->urlGenerator->generateFromRoute('<current>', [], ['query' => $request->query->all(), 'absolute' => TRUE]);
+      $url = $this->urlGenerator->generateFromRoute('<current>', [], ['query' => $request->query->all(), 'absolute' => TRUE], TRUE);
     }
 
     if ($url) {
       // According to RFC 7231, 303 See Other status code must be used to redirect
       // user agent (and not default 302 Found).
       // @see http://tools.ietf.org/html/rfc7231#section-6.4.4
-      return new RedirectResponse($url, Response::HTTP_SEE_OTHER);
+      $response = new CacheableRedirectResponse($url->getGeneratedUrl(), Response::HTTP_SEE_OTHER);
+      $response->addCacheableDependency($url);
+      return $response;
     }
   }
 
