<div dir="ltr">I have tried subclassing PageCache, but it is not doing Catalyst magic: when asked to do <br><pre><code class="error"><strong><strong class="line">   $c-&gt;cache_page( ..) <br><br><span style="font-weight: normal;">it says </span></strong></strong></code></pre>
<pre><code class="error">Can&#39;t locate object method &quot;cache_page&quot; via package.... </code></pre><br><br><div class="gmail_quote">2008/8/8 Martin Ellison <span dir="ltr">&lt;<a href="mailto:m.e@acm.org">m.e@acm.org</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><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" target="_blank">http://www.example1.com</a>&nbsp;&nbsp; and</li><li><a href="http://www.example2.net" target="_blank">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> </span><span>_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> </span><span>_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" target="_blank">m.e@acm.org</a>)<br>IT: <a href="http://methodsupport.com" target="_blank">http://methodsupport.com</a> Personal: <a href="http://thereisnoend.org" target="_blank">http://thereisnoend.org</a><br>


</div></div>
</blockquote></div><br><br clear="all"><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>