public function clear($path) { /* Recursively clears cached content for the given path. $path: an array of cache names - as a minimum, this must contain one name, e.g. the template name. */ if (!is_array($path)) { $path = array($path); } $dir = $this->config['cache_path']; $last = count($path); for ($n = 0; $n < $last; $n++) { $dir .= '/' . OutlineUtil::clean($path[$n]); } $file = $dir . $this->config['cache_suffix']; if (is_dir($dir)) { OutlineUtil::delete($dir, $this->config['cache_suffix']); } if (is_file($file)) { unlink($file); } }