The cache will be created automatically after the contents are saved. More Info

true); if(get_option("WpFastestCache_autocache")){ update_option("WpFastestCache_autocache", sanitize_text_field($_POST["is_enable"])); }else{ add_option("WpFastestCache_autocache", sanitize_text_field($_POST["is_enable"]), null, "yes"); } wp_send_json($res); } wp_die("Must be admin"); } public static function set_id(){ if(isset($_GET["post"]) && $_GET["post"]){ static::$id = (int) $_GET["post"]; if(get_post_status(static::$id) != "publish"){ static::$id = 0; } } } public static function create_cache(){ $res = $GLOBALS["wp_fastest_cache"]->wpfc_remote_get($_GET["url"], $_GET["user_agent"]); if($res){ die("true"); } } public static function is_mobile_active(){ if(isset($GLOBALS["wp_fastest_cache_options"]->wpFastestCacheMobile) && isset($GLOBALS["wp_fastest_cache_options"]->wpFastestCacheMobileTheme)){ return true; }else{ return false; } } public static function set_term_urls($term_taxonomy_id){ $term = get_term_by("term_taxonomy_id", $term_taxonomy_id); if($term && !is_wp_error($term)){ $url = get_term_link($term->term_id, $term->taxonomy); array_push(static::$urls, array("url" => $url, "user-agent" => "WP Fastest Cache Preload Bot")); if(self::is_mobile_active()){ array_push(static::$urls, array("url" => $url, "user-agent" => "WP Fastest Cache Preload iPhone Mobile Bot")); } if($term->parent > 0){ $parent = get_term_by("id", $term->parent, $term->taxonomy); static::set_term_urls($parent->term_taxonomy_id); } } } public static function set_urls_with_terms(){ global $wpdb; $terms = $wpdb->get_results("SELECT * FROM `".$wpdb->prefix."term_relationships` WHERE `object_id`=".static::$id, ARRAY_A); foreach ($terms as $term_key => $term_val){ static::set_term_urls($term_val["term_taxonomy_id"]); } } public static function set_urls(){ if(static::$id){ $permalink = get_permalink(static::$id); array_push(static::$urls, array("url" => $permalink, "user-agent" => "WP Fastest Cache Preload Bot")); if(self::is_mobile_active()){ array_push(static::$urls, array("url" => $permalink, "user-agent" => "WP Fastest Cache Preload iPhone Mobile Bot")); } } } public static function put_inline_js(){ if($data = get_option("WpFastestCache_autocache")){ if($data == "no"){ return false; } }else{ return false; } ?>