I am new to the idea of cacheing and looked but could not find the answers I
need so I ask all of you for a simple answer.
 
1. <cake:nocache> blocks will not cache the views sections </cake:nocache>
 
2.this will cache the data from a query so it i need the data again it reads
from the cache saving the db from wear and tear. So I check my cache folder
and see cake_default_clouds and all my cloud data
$cloud = Cache::read('cloud');

if ($cloud !== false) {
        return $cloud;
}

// generate cloud data
// ...

// store data in cache
Cache::write('cloud', $cloud);
return $cloud;

 

3. 
var $cacheAction = array(
        'view/23' => 21600,
        'view/48' => 36000,
        'view/52'  => 48000
);
What does this cache? The actual query as in the data pulled from each
action? The view? The view with the data? It caches the action for [time]
but what is being cached? If view/23 is pulling data from the db is the data
being saved that's found?

4. var = $cacheQueries
What does this cache? The data, the view? The actual SQL query? The results
from the query?

And few general use questions:

Cache is for general purpose use or can I create a cache file for each user?
My user logs in I do a quick find of all there preferences and use that data
thruout the site to display options or not depending on selections. Can I
use Cache::write($my_user_id.'_settings', $settings); so ech users settings
are cached or better to use sessions for this data?

And finally I have my countries_cache file will all my countries so I go to
pages where a $countries list gets generated and there is no SQL for it
since its coming from the cache which is good, but can you use that
country_cache data in a contain? So when I use my $user =
$this->getUserinfo() which has a contain to pull Users Country.name,
State.abrev can I pull that data from the cache?

Thanks all...i know it was a long one

Dave 

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 [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?hl=en

Reply via email to