<?if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED!==true) die();

AddEventHandler("iblock", "OnAfterIBlockElementAdd", Array("IB_CACHE", "ClearCache"));
        AddEventHandler("iblock", "OnAfterIBlockElementUpdate", Array("IB_CACHE", "ClearCache"));
        AddEventHandler("iblock", "OnAfterIBlockSectionAdd", Array("IB_CACHE", "ClearCache"));
        AddEventHandler("iblock", "OnAfterIBlockSectionUpdate", Array("IB_CACHE", "ClearCache"));
        AddEventHandler("iblock", "OnBeforeIBlockSectionDelete", Array("IB_CACHE", "ClearCache"));
        AddEventHandler("iblock", "OnBeforeIBlockElementDelete", Array("IB_CACHE", "ClearCache"));

        class IB_CACHE
        {
        function ClearCache(&$arFields)
        {
        // очистим весь кеш
        BXClearCache(true, "");
        }
        } 
?>