summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-08-06 20:38:48 +0000
committerDries Buytaert <dries@buytaert.net>2004-08-06 20:38:48 +0000
commit9e54dc27ff91c7bf2d8edb1bf07f9c893a3b1ae8 (patch)
tree3ae3571e7f1ff7618119d64bc623578411ff7ddc
parent9bad647d76bb682ae51ba4b66608ab6e13f19a04 (diff)
downloadbrdo-9e54dc27ff91c7bf2d8edb1bf07f9c893a3b1ae8.tar.gz
brdo-9e54dc27ff91c7bf2d8edb1bf07f9c893a3b1ae8.tar.bz2
- Patch #7968 by Adrian: use the complete URL as the cache ID to make Drupal's
caching work on virtual hosts.
-rw-r--r--includes/bootstrap.inc8
1 files changed, 4 insertions, 4 deletions
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();