0

在控制器中我可以使用clearCache();,但它会删除整个 /cache/views/ 目录。有没有办法只删除当前的pageid缓存?谢谢!

4

1 回答 1

1

您应该阅读有关它的 docblock / 文档

function clearCache($params = null, $type = 'views', $ext = '.php') {}

它为 $params 声明:

@param string|array $params As String name to be searched for deletion, if name is a directory all files in
 *   directory will be deleted. If array, names to be searched for deletion. If clearCache() without params,
 *   all files in app/tmp/cache/views will be deleted
于 2013-03-08T12:18:06.167 回答