On 10/5/06, neilg <[EMAIL PROTECTED]> wrote:
>
> Hi all
>
> I am trying to implement view caching on my site.  I have successfully
> implement cake's view caching, but my problem is this: cake's view
> cache's key is comprised only of url, so two people with different
> session vars will see the same html.  I know that I can use
> <cake:nocache>, but that may require that all the logic in the action
> is executed.
>
> I would like to created a cache which uses a compound key, perhaps
> consisting of $_REQUEST, $_SERVER['REQUEST_URI'] and other variables -
> just like PEAR's Cache library does.
>
> Any ideas?
>
> - Neil

Hey Neil,

One quick-and-dirty way to do what you want is to pass a parameter to
your controller / action pair that is unique to that user i.e:

/page/bar/uniqueid

That might do the trick.  I do similar things with my ajax code for
graphing so that graphs are not cached.

Hope that helps.

-- 
Chris Hartjes

"The greatest inefficiencies come from solving problems you will never have."
-- Rasmus Lerdorf

@TheBallpark - http://www.littlehart.net/attheballpark
@TheKeyboard - http://www.littlehart.net/atthekeyboard

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to