[drupal-devel] Cache sid
Dries Buytaert
dries at buytaert.net
Tue Mar 1 18:07:13 UTC 2005
Julian Bond wrote:
> I have a test drupal 4.51 at http://localhost/bikeweb
>
> So in conf.php I have
> $base_url = "http://localhost/bikeweb";
>
> In bootstrap.inc function page_set_cache()
> cached pages are saved at
> $base_url . request_uri()
>
> and Apache is reporting via function request_uri()
> $_SERVER['REQUEST_URI'] = '/bikeweb/'
>
> So the cached page gets set in the cache table with a cid of
> http://localhost/bikeweb/bikeweb/
> if the cache has to be rebuilt, I then start getting assorted errors
> because the path is now wrong.
>
> This doesn't look right to me although it will only fail on
> installations that are not in the root of the url.
I can reproduce this on Drupal HEAD. Both page_cache_get() and
page_cache_set() use the "$base_url . request_uri()" construct.
So while this isn't right, it shouldn't impact performance.
What errors do you get?
Maybe we should use url($_GET['q']) instead? We'd have to move url() to
bootstrap.inc though. Test and patch?
--
Dries Buytaert :: http://www.buytaert.net/
More information about the drupal-devel
mailing list