示例#1
0
function CTL_clearCache($plugin = '')
{
    global $TEMPLATE_OPTIONS, $_CONF;
    if (!empty($plugin)) {
        $plugin = '__' . $plugin . '__';
    }
    CTL_clearCacheDirectories($_CONF['path_data'] . 'layout_cache/', $plugin);
    CTL_clearCacheDirectories($_CONF['path_data'] . 'layout_css/', $plugin);
}
示例#2
0
function CTL_clearCache($plugin = '')
{
    global $TEMPLATE_OPTIONS, $_CONF, $_SYSTEM;
    if (!empty($plugin)) {
        $plugin = '__' . $plugin . '__';
    }
    if (!isset($_CONF['css_cache_filename'])) {
        $_CONF['css_cache_filename'] = 'style.cache';
    }
    if (!isset($_CONF['js_cache_filename'])) {
        $_CONF['js_cache_filename'] = 'js.cache';
    }
    CTL_clearCacheDirectories($_CONF['path_data'] . 'layout_cache/', $plugin);
    if (empty($plugin)) {
        if (isset($_SYSTEM['use_direct_style_js']) && $_SYSTEM['use_direct_style_js']) {
            foreach (glob($_CONF['path_layout'] . $_CONF['css_cache_filename'] . "*.*") as $filename) {
                @unlink($filename);
            }
            foreach (glob($_CONF['path_layout'] . $_CONF['js_cache_filename'] . "*.*") as $filename) {
                @unlink($filename);
            }
        }
        if (defined('DVLP_DEBUG')) {
            COM_errorLog("DEBUG: Cache has been cleared");
        }
    }
}