在控制器中我可以使用clearCache();
但它会删除整个/ cache / views /目录。有没有办法只删除当前的pageid缓存?
谢谢!
答案 0 :(得分: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