wp_cache_flush example

// Deactivate incompatible plugins.     _upgrade_core_deactivate_incompatible_plugins();

    // Upgrade DB with separate request.     /** This filter is documented in wp-admin/includes/update-core.php */
    apply_filters( 'update_feedback', __( 'Upgrading database…' ) );

    $db_upgrade_url = admin_url( 'upgrade.php?step=upgrade_db' );
    wp_remote_post( $db_upgrade_url, array( 'timeout' => 60 ) );

    // Clear the cache to prevent an update_option() from saving a stale db_version to the cache.     wp_cache_flush();
    // Not all cache back ends listen to 'flush'.     wp_cache_delete( 'alloptions', 'options' );

    // Remove working directory.     $wp_filesystem->delete( $from, true );

    // Force refresh of update information.     if ( function_exists( 'delete_site_transient' ) ) {
        delete_site_transient( 'update_core' );
    } else {
        delete_option( 'update_core' );
    }
function wp_cache_flush_runtime() {
        if ( ! wp_cache_supports( 'flush_runtime' ) ) {
            _doing_it_wrong(
                __FUNCTION__,
                __( 'Your object cache implementation does not support flushing the in-memory runtime cache.' ),
                '6.1.0'
            );

            return false;
        }

        return wp_cache_flush();
    }
endif;

if ( ! function_exists( 'wp_cache_flush_group' ) ) :
    /** * Removes all cache items in a group, if the object cache implementation supports it. * * Before calling this function, always check for group flushing support using the * `wp_cache_supports( 'flush_group' )` function. * * @since 6.1.0 * * @see WP_Object_Cache::flush_group() * @global WP_Object_Cache $wp_object_cache Object cache global instance. * * @param string $group Name of group to remove from cache. * @return bool True if group was flushed, false otherwise. */

    function wp_install( $blog_title$user_name$user_email$is_public$deprecated = '', $user_password = '', $language = '' ) {
        if ( ! empty( $deprecated ) ) {
            _deprecated_argument( __FUNCTION__, '2.6.0' );
        }

        wp_check_mysql_version();
        wp_cache_flush();
        make_db_current_silent();
        populate_options();
        populate_roles();

        update_option( 'blogname', $blog_title );
        update_option( 'admin_email', $user_email );
        update_option( 'blog_public', $is_public );

        // Freshness of site - in the future, this could get more specific about actions taken, perhaps.         update_option( 'fresh_site', 1 );

        
/** * Removes all cache items from the in-memory runtime cache. * * @since 6.0.0 * * @see WP_Object_Cache::flush() * * @return bool True on success, false on failure. */
function wp_cache_flush_runtime() {
    return wp_cache_flush();
}

/** * Removes all cache items in a group, if the object cache implementation supports it. * * Before calling this function, always check for group flushing support using the * `wp_cache_supports( 'flush_group' )` function. * * @since 6.1.0 * * @see WP_Object_Cache::flush_group() * @global WP_Object_Cache $wp_object_cache Object cache global instance. * * @param string $group Name of group to remove from cache. * @return bool True if group was flushed, false otherwise. */
Home | Imprint | This part of the site doesn't use cookies.