cake-php@googlegroups.com
[Top] [All Lists]

Re: Setting individual cache prefix in cake 1.3

Subject: Re: Setting individual cache prefix in cake 1.3
From: Emulator
Date: Wed, 20 Oct 2010 08:57:18 -0700 PDT
Hi,


On 20 Okt., 16:38, cricket <zijn.digi...@xxxxxxxxx> wrote:
> On Wed, Oct 20, 2010 at 6:43 AM, Emulator
>
> <thorsten.koer...@xxxxxxxxxxxxxx> wrote:
> > Hi,
>
> > I wonder if cakePHP still isn't able to have multiple cache prefixes
> > for cached views.
> > I am currently evaluating different MVC frameworks for a larger web
> > project. One of the key requirements is to enable different views for
> > different devices such as smartphones, TV, game consoles etc.
> > It is required to use exacly the same URLs for all devices like
> >http://www.example.com/products/detail/123/myproductwhere "myproduct"
> > is an addition to URL to have better SEO URLs.
>
> Why don't you leave out the ID then and just use the slug?

shouldn't there be a cachefile for each single page? In this case the
detail page of a product with the id 123
My problem is, that view files are allways named without the
configured prefix, no matter in which way i try to add a prefix.
The above example will be cached as products_detail_123_myproduct.php
but expected for example xhtml_products_detail_123_myproduct.php,
iphone_products_detail_123_myproduct.php etc. where xhtml_ and iphone_
are prefixes.
When starting the app, each device will cause the correct layout and
view, but write it to the wrong cachefile (allways the same
cachefile). So the first call to the page will define the layout, and
as an example the iphone user will cause a cachefile with the small
iphone layout, the next user comes with a PC and will see the iphone
view, because he will read from the same cachefile.

>
> > Infact cakePHP 1.3 is able to do this, by selecting different layout-
> > and view-templates for different devices, but all the views will
> > result in the same cache file, where all prefixes like 'ps3_',
> > 'iphone_'  etc are set correct according to the documentation but
> > completly ignored by the caching engines (tried with File and
> > Memcache.)
> > This will kill cakePHP as a possible selection.
> > Is there a tip or a really functional running workaround, to have
> > caching enabled in this setup?
>
> CSS?
No, its hardly possible with CSS, because there are also differences
in the logic (can I see flash animations, can I use Javascript
Slideshows etc.)
I think it is not a good solution to load everything, and then decide
with CSS or Javascript, which divs are visible and which don't.

Maybe I try it, using elements where I can set the cache key manually.

Any more hints?

Greetings from Berlin
Thorsten

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to
cake-php+unsubscribe@xxxxxxxxxxxxxxxx For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

<Prev in Thread] Current Thread [Next in Thread>