Documentation

BXClearCache

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

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

Function 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/.

Examples of use

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


© «Bitrix24», 2001-2024
Up