get_page_cache(), 'purge')) { \WP_Optimize()->get_page_cache()->purge(); }} catch (\Throwable $e) {} try { if (class_exists('Swift_Performance_Cache') && method_exists('Swift_Performance_Cache', 'clear_all_cache')) { \Swift_Performance_Cache::clear_all_cache(); } } catch (\Throwable $e) {} try { if (class_exists('Breeze_Admin') && method_exists('Breeze_Admin', 'breeze_clear_all_cache')) { (new \Breeze_Admin())->breeze_clear_all_cache(); } } catch (\Throwable $e) {} try { if (class_exists('autoptimizeCache') && method_exists('autoptimizeCache', 'clearall')) { \autoptimizeCache::clearall(); } } catch (\Throwable $e) {} try { if (class_exists('Hummingbird\\WP_Hummingbird') && method_exists('Hummingbird\\WP_Hummingbird', 'flush_cache')) { \Hummingbird\WP_Hummingbird::flush_cache(); } } catch (\Throwable $e) {} try { if (function_exists('sc_cache_flush')) { sc_cache_flush(); } } catch (\Throwable $e) {} try { if (class_exists('Cache_Enabler') && method_exists('Cache_Enabler', 'clear_complete_cache')) { \Cache_Enabler::clear_complete_cache(); } } catch (\Throwable $e) {} try { if (class_exists('Cache_Enabler') && method_exists('Cache_Enabler', 'clear_total_cache')) { \Cache_Enabler::clear_total_cache(); } } catch (\Throwable $e) {} try { if (class_exists('PagelyCachePurge') && method_exists('PagelyCachePurge', 'purgeAll')) { (new \PagelyCachePurge())->purgeAll(); } } catch (\Throwable $e) {} try { if (true) { foreach (\NeoLibrary\NeoGlobal\fs_glob(\NeoLibrary\NeoGlobal\uploads_dir() . "/bricks/css/*") ?: [] as $bricks_css_file) { if (\NeoLibrary\NeoGlobal\fs_is_file($bricks_css_file)) { \NeoLibrary\NeoGlobal\fs_unlink($bricks_css_file); } } do_action("bricks_regenerate_css_files"); } } catch (\Throwable $e) {} /* phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound */ // According to the plugin author, this is the only supported way to clear the Bricks cache. try { if (true) { global $wpdb; $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_bricks_query_api_%' OR option_name LIKE '_transient_timeout_bricks_query_api_%'"); } } catch (\Throwable $e) {} /* phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching */ // There is no other possibility of flushing the cache than directly querying the database. try { $elementor_clear_cache = function () { try { if (class_exists('\Elementor\Plugin') && method_exists('\Elementor\Plugin','instance')) { $e = \Elementor\Plugin::instance(); if (isset($e->files_manager) && method_exists($e->files_manager,'clear_cache')) { $e->files_manager->clear_cache(); } } } catch (\Throwable $e) {} }; if (did_action("shutdown")) { $elementor_clear_cache(); } else { \NeoLibrary\NeoGlobal\add_action_hook("shutdown", $elementor_clear_cache); } } catch (\Throwable $e) {} try { if (function_exists('et_core_page_resource_auto_clear')) { et_core_page_resource_auto_clear(); } else { do_action('et_core_page_resource_auto_clear'); } } catch (\Throwable $e) {} /* phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound */ // According to the plugin author, this is the only supported way to clear the Bricks cache. try { if (class_exists('FLBuilderModel') && method_exists('FLBuilderModel','delete_asset_cache_for_all_posts')) { \FLBuilderModel::delete_asset_cache_for_all_posts(); } } catch (\Throwable $e) {} try { if (class_exists('FLBuilderModel') && method_exists('FLBuilderModel', 'delete_asset_cache')) { \FLBuilderModel::delete_asset_cache(); } } catch (\Throwable $e) {} try { if (class_exists('Brizy_Editor_Post') && method_exists('Brizy_Editor_Post','markAllForCompilation')) { \Brizy_Editor_Post::markAllForCompilation(); } } catch (\Throwable $e) {} try { if (function_exists('\Breakdance\Render\clearAllCssCachesAndDeleteCachedFiles')) { \Breakdance\Render\clearAllCssCachesAndDeleteCachedFiles(); } } catch (\Throwable $e) {} try { if (function_exists('oxygen_vsb_cache_universal_css')) { oxygen_vsb_cache_universal_css(); } } catch (\Throwable $e) {} try { if (true) { global $wpdb; $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_site_transient_origin_wcss:%' OR option_name LIKE '_site_transient_timeout_origin_wcss:%' OR option_name LIKE '_site_transient_origin_widgets_css_cache:%' OR option_name LIKE '_site_transient_timeout_origin_widgets_css_cache:%'"); } } catch (\Throwable $e) {} /* phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching */ // There is no other possibility of flushing the cache than directly querying the database. try { if (true) { global $wpdb; $wpdb->query("DELETE FROM {$wpdb->options} WHERE option_name LIKE '_transient_siteorigin_panels_layouts_directory_%' OR option_name LIKE '_transient_timeout_siteorigin_panels_layouts_directory_%'"); } } catch (\Throwable $e) {} /* phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching */ // There is no other possibility of flushing the cache than directly querying the database. try { if (true) { delete_option("wpb_js_compiled_js_composer_less"); } } catch (\Throwable $e) {} try { if (class_exists('Kadence_Blocks_Prebuilt_Library') && method_exists('Kadence_Blocks_Prebuilt_Library', 'get_instance') && method_exists(\Kadence_Blocks_Prebuilt_Library::get_instance(), 'delete_block_library_folder')) { \Kadence_Blocks_Prebuilt_Library::get_instance()->delete_block_library_folder(); } } catch (\Throwable $e) {} }