I have tried subclassing PageCache, but it is not doing Catalyst magic: when
asked to do

*   $c->cache_page( ..)

it says *

Can't locate object method "cache_page" via package....



2008/8/8 Martin Ellison <[EMAIL PROTECTED]>

> I get the impression that PageCache cannot discriminate on URL; is that
> correct?
>
> I am trying to 'whitelabel' 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.
>
> For example, I might have two hostnames:
>
>    - http://www.example1.com   and
>    - http://www.example2.net
>
> that both point to the same Catalyst server. I can find out the URL using
> $c->request->base() and use that to, say, select the appropriate CSS file
> and heading template for that site.
>
> But PageCache only works off $c->request->path() ie not the hostname. This
> behaviour is coded in the _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.
>
> It would be nice if there were some way to fix this and keep using
> PageCache, such as overriding _get_page_cache_key(). Does that make sense?
> eg writing a derived class from PageCache?
>
> --
> Regards,
> Martin
> ([EMAIL PROTECTED])
> IT: http://methodsupport.com Personal: http://thereisnoend.org
>



-- 
Regards,
Martin
([EMAIL PROTECTED])
IT: http://methodsupport.com Personal: http://thereisnoend.org
_______________________________________________
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

Reply via email to