Use of Model::set
$this->Post->read(null, 1);
$this->Post->set(array(
'title' => 'New title',
'published' => false
));
$this->Post->save();
Model::save - alternative
save(array $data = null, array $params = array())
$params = array(
'validate' => true,
'fieldList' => array(),
'callbacks' => true //other possible values are false, 'before', 'after'
)
http://book.cakephp.org/view/1031/Saving-Your-Data#counterCache-Cache-your-count-1033
deleteAll(mixed $conditions, $cascade = true, $callbacks = false)
unbindModel only affects the very next find function. An additional find call will use the configured association information.
$this->element('helpbox',
array(
"cache" => array('time'=> "+7 days",'key'=>'unique value')
)
);
$this->cakeError(string $errorType [, array $parameters]);
debug($var, $showHTML = false, $showFrom = true):
Output from this function is only shown if the core debug variable has been set to a value greater than 0.
Session component
- cache
- Use the caching engine configured by Cache::config(). Very useful in conjunction with Memcache (in setups with multiple application servers) to store both cached data and sessions.
Brak komentarzy:
Prześlij komentarz