Always use the absolute URL when caching a page and looking up a cached page. This avoids having two versions of a page cached, one with a relative URL and one with an absolute URL.