<div dir="ltr"><div>I get the impression that PageCache cannot discriminate on URL; is that correct?<br><br>I am trying to &#39;whitelabel&#39; a site, that is to run several hostnames into the one Catalyst site and then serve somewhat different content based on the URL, giving the appearance of multiple websites. However, it seems that the PageCache plugin does not allow this.<br>
<br>For example, I might have two hostnames:<br><ul><li><a href="http://www.example1.com">http://www.example1.com</a>&nbsp;&nbsp; and</li><li><a href="http://www.example2.net">http://www.example2.net</a></li></ul></div>that both point to the same Catalyst server. I can find out the URL using $c-&gt;request-&gt;base() and use that to, say, select the appropriate CSS file and heading template for that site. <br>
<br>But PageCache only works off $c-&gt;request-&gt;path() ie not the hostname. This behaviour is coded in the <span class="k"> </span><span class="m">_get_page_cache_key() subroutine. This means that the PageCache serves up the same page content for all websites, irrespective of URL, which is not what I want.<br>
<br>It would be nice if there were some way to fix this and keep using PageCache, such as overriding </span><span class="k"> </span><span class="m">_get_page_cache_key(). Does that make sense? eg writing a derived class from PageCache?<br>
</span><div><br>-- <br>Regards,<br>Martin<br>(<a href="mailto:m.e@acm.org">m.e@acm.org</a>)<br>IT: <a href="http://methodsupport.com">http://methodsupport.com</a> Personal: <a href="http://thereisnoend.org">http://thereisnoend.org</a><br>

</div></div>