Commit 2c9c01bf authored by webchick's avatar webchick

Issue #2209583 by ianthomas_uk: Remove use of...

Issue #2209583 by ianthomas_uk: Remove use of drupal_set_title()/drupal_get_title()/_system_path from page cache.
parent 49a687fa
...@@ -1769,9 +1769,6 @@ function _drupal_bootstrap_page_cache() { ...@@ -1769,9 +1769,6 @@ function _drupal_bootstrap_page_cache() {
if (is_object($cache)) { if (is_object($cache)) {
$response = new Response(); $response = new Response();
$response->headers->set('X-Drupal-Cache', 'HIT'); $response->headers->set('X-Drupal-Cache', 'HIT');
// Restore the metadata cached with the page.
_current_path($cache->data['path']);
drupal_set_title($cache->data['title'], PASS_THROUGH);
date_default_timezone_set(drupal_get_user_timezone()); date_default_timezone_set(drupal_get_user_timezone());
drupal_serve_page_from_cache($cache, $response, $request); drupal_serve_page_from_cache($cache, $response, $request);
......
...@@ -3248,9 +3248,7 @@ function drupal_page_set_cache(Response $response, Request $request) { ...@@ -3248,9 +3248,7 @@ function drupal_page_set_cache(Response $response, Request $request) {
$cache = (object) array( $cache = (object) array(
'cid' => drupal_page_cache_get_cid($request), 'cid' => drupal_page_cache_get_cid($request),
'data' => array( 'data' => array(
'path' => $request->attributes->get('_system_path'),
'body' => $response->getContent(), 'body' => $response->getContent(),
'title' => drupal_get_title(),
'headers' => array(), 'headers' => array(),
// We need to store whether page was compressed or not, // We need to store whether page was compressed or not,
// because by the time it is read, the configuration might change. // because by the time it is read, the configuration might change.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment