Bitrix Site Manager

BXClearCache

bool
BXClearCache(
 bool delete_all = false,
 string dir = ""
)

The function BXClearCache deletes all or expired cache files on the specified path. Returns true on success, or false otherwise.

Parameters

ParameterDescription
delete_all If set to "true", the function deletes all cache files. A value of false tells to delete the expired files only.
dir Starting directory for processing. Used for partial clean-up. Should be specified relative to the cache root folder: /bitrix/cache/.

Example



<?
// delete all cache files from folder /forum/
BXClearCache(true, "/forum/");
?>