 core/includes/common.inc                           |   34 +++++++++++++++++++-
 .../node/lib/Drupal/node/NodeRenderController.php  |    2 +-
 core/modules/system/system.module                  |    1 +
 3 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/core/includes/common.inc b/core/includes/common.inc
index 9f1aac9..4d1abb8 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -3213,7 +3213,7 @@ function drupal_page_set_cache(Response $response, Request $request) {
         // because by the time it is read, the configuration might change.
         'page_compressed' => $page_compressed,
       ),
-      'tags' => array('content' => TRUE),
+      'tags' => array('content' => TRUE) + drupal_cache_tags_page_get(),
       'expire' => CacheBackendInterface::CACHE_PERMANENT,
       'created' => REQUEST_TIME,
     );
@@ -4455,6 +4455,38 @@ function drupal_render_collect_cache_tags($element, $tags = array()) {
 }
 
 /**
+ * A #post_render callback at the top level of the $page array. Collects the
+ * tags for use in page cache.
+ *
+ * @param string $children
+ *   An HTML string of rendered output.
+ * @param array $elements
+ *   A render array.
+ *
+ * @return string
+ *   The same $children that was passed in - no modifications.
+ */
+function drupal_post_render_cache_tags_page_set($children, array $elements) {
+  if (drupal_page_is_cacheable()) {
+    $tags = &drupal_static('system_cache_tags_page', FALSE);
+    $tags = drupal_render_collect_cache_tags($elements);
+  }
+  return $children;
+}
+
+/**
+ * Return the cache tags that were stored during drupal_render_page().
+ *
+ * @return array
+ *   An array of cache tags.
+ *
+ * @see drupal_post_render_cache_tags_page_set()
+ */
+function drupal_cache_tags_page_get() {
+  return drupal_static('system_cache_tags_page', array());
+}
+
+/**
  * Prepares an element for caching based on a query.
  *
  * This smart caching strategy saves Drupal from querying and rendering to HTML
diff --git a/core/modules/node/lib/Drupal/node/NodeRenderController.php b/core/modules/node/lib/Drupal/node/NodeRenderController.php
index 433adb3..62981e7 100644
--- a/core/modules/node/lib/Drupal/node/NodeRenderController.php
+++ b/core/modules/node/lib/Drupal/node/NodeRenderController.php
@@ -88,7 +88,7 @@ protected function alterBuild(array &$build, EntityInterface $entity, EntityDisp
 
     // The node 'submitted' info is not rendered in a standard way (renderable
     // array) so we have to add a cache tag manually.
-    $build['#cache']['tags']['user'][] = $entity->uid;
+    $build['#cache']['tags']['user'][] = $entity->uid->value;
   }
 
 }
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index a011204..06f4155 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -261,6 +261,7 @@ function system_element_info() {
     '#theme_wrappers' => array('form'),
   );
   $types['page'] = array(
+    '#post_render' => array('drupal_post_render_cache_tags_page_set'),
     '#show_messages' => TRUE,
     '#theme' => 'page',
     '#theme_wrappers' => array('html'),
