clearCacheについて
Posted: 2015年5月09日(土) 16:54
$modx->clearCacheでリソースIDを指定すると、そのリソースのキャッシュを削除できるはずですができませんでした。
$page_cache_pathが見つからないようでしたので下記のように変更すると動きました。
sub.document.parser.class.inc.phpの200行目あたりです。
変更前
変更後
$page_cache_pathが見つからないようでしたので下記のように変更すると動きました。
sub.document.parser.class.inc.phpの200行目あたりです。
変更前
コード: 全て選択
$_ = array('pages','pc','smartphone','tablet','mobile');
foreach($_ as $uaType)
{
if(is_file(MODX_BASE_PATH . "assets/cache/{$uaType}/{$filename}.pageCache.php"))
unlink($page_cache_path);
}
コード: 全て選択
$_ = array('pages','pc','smartphone','tablet','mobile');
foreach($_ as $uaType)
{
$page_cache_path = MODX_BASE_PATH . "assets/cache/{$uaType}/{$filename}.pageCache.php";
if(is_file($page_cache_path))
unlink($page_cache_path);
}