private function clear_cache_plugins() { /* Not implemented yet - still testing */ /*** * Automatically clears page caches after plugin install or upgrade * Called from upgrade_check() * Added 1.9.6.2 ***/ global $wpss_cache_check, $wp_fastest_cache; if (empty($wpss_cache_check)) { $wpss_cache_check = rs_wpss_check_cache_status(); } if ($wpss_cache_check['cache_check_status'] === 'ACTIVE') { if (rs_wpss_is_plugin_active('w3-total-cache/w3-total-cache.php') && function_exists('w3tc_pgcache_flush')) { /* W3 Total Cache */ w3tc_pgcache_flush(); } if (rs_wpss_is_plugin_active('wp-super-cache/wp-cache.php') && function_exists('wp_cache_clean_cache')) { /* WP Super Cache */ global $file_prefix; wp_cache_clean_cache($file_prefix); } if (rs_wpss_is_plugin_active('wp-fastest-cache/wpFastestCache.php') && !empty($wp_fastest_cache) && method_exists('WpFastestCache', 'deleteCache')) { /* WP Fastest Cache */ $wp_fastest_cache->deleteCache(); } if (class_exists('WPE_API', FALSE) && class_exists('WpeCommon')) { /* WP Engine Hosting */ if (method_exists('WpeCommon', 'purge_memcached')) { WpeCommon::purge_memcached(); } if (method_exists('WpeCommon', 'clear_maxcdn_cache')) { WpeCommon::clear_maxcdn_cache(); } if (method_exists('WpeCommon', 'purge_varnish_cache')) { WpeCommon::purge_varnish_cache(); } } } }
private function clear_cache_plugins() { /* Not fully implemented yet - still testing */ /** * Automatically clears page caches after plugin install or upgraded * Called from upgrade_check() * Added 1.9.6.2, Modified 1.9.7.5 */ global $wpss_cache_check, $wp_fastest_cache, $file_prefix, $supercachedir; /* Flush Memcache(d) */ $flush_memcache = wp_cache_flush(); return; /* Temp - 1.9.7.5 */ /* Check if cache plugins or server-side caching active */ if (empty($wpss_cache_check)) { $wpss_cache_check = rs_wpss_check_cache_status(); } if ($wpss_cache_check['cache_check_status'] === 'ACTIVE') { if (WPSS_Compatibility::is_plugin_active('w3-total-cache/w3-total-cache.php') && function_exists('w3tc_pgcache_flush')) { /* W3 Total Cache */ w3tc_pgcache_flush(); } if (WPSS_Compatibility::is_plugin_active('wp-super-cache/wp-cache.php') && function_exists('wp_cache_clean_cache')) { /* WP Super Cache */ if (empty($supercachedir) && function_exists('get_supercache_dir')) { $supercachedir = get_supercache_dir(); } wp_cache_clean_cache($file_prefix); } if (WPSS_Compatibility::is_plugin_active('wp-fastest-cache/wpFastestCache.php') && method_exists('WpFastestCache', 'deleteCache') && !empty($wp_fastest_cache)) { /* WP Fastest Cache */ $wp_fastest_cache->deleteCache(); } if (class_exists('WPE_API', FALSE) && class_exists('WpeCommon')) { /* WP Engine Hosting */ if (method_exists('WpeCommon', 'purge_memcached')) { WpeCommon::purge_memcached(); } if (method_exists('WpeCommon', 'clear_maxcdn_cache')) { WpeCommon::clear_maxcdn_cache(); } if (method_exists('WpeCommon', 'purge_varnish_cache')) { WpeCommon::purge_varnish_cache(); } } /* Add Autoptimize & other Cache Plugins... */ } }