Friday, June 24, 2011

NoCaching Small Model-Data-Driven Parts of Pages?

I want to employ CakePHP's basic caching functionality on my site's home
page. However, there is one element on the page that should display
different data depending on the visitor's location, as determined by their
IP address.

You can't wrap <cake:nocache> around variables that are set in the
controller, which is where I was previously determining the location and
getting the data. My question therefore is: where can I optimally set a
(session?) variable to contain visitor location information before the
controller? How can I use this information to populate an array of data for
the nocached portion of the view, while completely sidestepping the
controller action, which is no longer being called?

Any advice greatly appreciated!

--
View this message in context: http://cakephp.1045679.n5.nabble.com/NoCaching-Small-Model-Data-Driven-Parts-of-Pages-tp4521784p4521784.html
Sent from the CakePHP mailing list archive at Nabble.com.

--
Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php

No comments: