bool CPageCache::IsCacheExpired( string full_path )
The method IsCacheExpired checks whether the cache is expired or not. Usually, the function is used to delete the expired cache files.
Note!
A cache file created by the CPageCache class functions has the ".html"
extension.
Parameter | Description |
---|---|
full_path | The full path to the cache file. |
<? $path = $_SERVER["DOCUMENT_ROOT"]."/bitrix/cache/"; if($handle = @opendir($path)) { while(($file=readdir($handle))!==false) { if($file == "." || $file == "..") continue; if(!is_dir($path."/".$file)) { if(substr($file, -5)==".html") $expired = CPageCache::IsCacheExpired($path."/".$file); elseif(substr($file, -4)==".php") $expired = CPHPCache::IsCacheExpired($path."/".$file); } } } ?>
© 2001-2005 Bitrix | Bitrix Site Manager - Content Management & Portal Solutions |