Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Model/Behavior/CacheableBehavior.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class CacheableBehavior extends ModelBehavior {
* @return void
* @access public
*/
function setup($model, $config = array()) {
function setup(Model $model, $config = array()) {
$defaults = array(
'engine' => 'File',
'duration' => '+1 hour',
Expand Down Expand Up @@ -146,12 +146,12 @@ public function setCache($model, $key, $data) {
$this->_configure($model);
return Cache::write($key, $data, 'cacheable' . $model->alias);
}
public function afterSave($model, $created) {

public function afterSave(Model $model, $created, $options = array()) {
$this->deleteCache($model);
}
public function afterDelete($model) {

public function afterDelete(Model $model) {
$this->deleteCache($model);
}
}