function flush_cache($site_id = 1)
{
// delete all variables saved in the db
if ($result = $this->EE->db->where('site_id', $site_id)->delete('stash')) {
// remove all files in the static dir, if static caching is enabled
if ($this->EE->config->item('stash_static_cache_enabled')) {
$this->_delete_dir('/', $site_id);
}
// -------------------------------------
// 'stash_flush_cache' hook
// -------------------------------------
if ($this->EE->extensions->active_hook('stash_flush_cache') === TRUE) {
$this->EE->extensions->call('stash_flush_cache', $site_id);
}
return $result;
}
return FALSE;
}