diff --git a/system/expressionengine/third_party/stash/models/stash_model.php b/system/expressionengine/third_party/stash/models/stash_model.php index e76efa2..b33aa66 100755 --- a/system/expressionengine/third_party/stash/models/stash_model.php +++ b/system/expressionengine/third_party/stash/models/stash_model.php @@ -406,7 +406,7 @@ function delete_matching_keys($bundle_id = FALSE, $session_id=NULL, $site_id = 1 * @param integer $invalidate Delay until cached item expires (seconds) * @return boolean */ - protected function delete_cache($vars, $clear_static = TRUE, $invalidate = 0) + protected function delete_cache($vars, $clear_static = TRUE, $invalidate = 0, $call_hook = TRUE) { // get a list of variable ids $ids = array(); @@ -443,7 +443,8 @@ protected function delete_cache($vars, $clear_static = TRUE, $invalidate = 0) // ------------------------------------- // 'stash_delete' hook // ------------------------------------- - if ($this->EE->extensions->active_hook('stash_delete') === TRUE) + if ($this->EE->extensions->active_hook('stash_delete') === TRUE + && $call_hook === TRUE) { $this->EE->extensions->call('stash_delete', array( 'key_name' => $row->key_name, @@ -541,7 +542,7 @@ function prune_keys() if ($query->num_rows() > 0) { - if ($deleted = $this->delete_cache($query->result())) + if ($deleted = $this->delete_cache($query->result(), TRUE, 0, FALSE)) { return TRUE; }