From 9e54dc27ff91c7bf2d8edb1bf07f9c893a3b1ae8 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 6 Aug 2004 20:38:48 +0000 Subject: - Patch #7968 by Adrian: use the complete URL as the cache ID to make Drupal's caching work on virtual hosts. --- includes/bootstrap.inc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'includes/bootstrap.inc') diff --git a/includes/bootstrap.inc b/includes/bootstrap.inc index 905612bf6..8241fc41f 100644 --- a/includes/bootstrap.inc +++ b/includes/bootstrap.inc @@ -147,7 +147,7 @@ function cache_clear_all($cid = NULL) { * Store the current page in the cache. */ function page_set_cache() { - global $user; + global $user, $base_url; if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET') { // This will fail in some cases, see page_get_cache() for the explanation. @@ -160,7 +160,7 @@ function page_set_cache() { $data = gzencode($data, FORCE_GZIP); } } - cache_set(request_uri(), $data, 1, drupal_get_headers()); + cache_set($base_url . request_uri(), $data, 1, drupal_get_headers()); } } } @@ -174,12 +174,12 @@ function page_set_cache() { * get cached either. */ function page_get_cache() { - global $user; + global $user, $base_url; $cache = NULL; if (!$user->uid && $_SERVER['REQUEST_METHOD'] == 'GET' && count(drupal_set_message()) == 0) { - $cache = cache_get(request_uri()); + $cache = cache_get($base_url . request_uri()); if (empty($cache)) { ob_start(); -- cgit v1.2.3