wp_cache_set_users_last_changed example



    wp_cache_delete( $user->ID, 'users' );
    wp_cache_delete( $user->user_login, 'userlogins' );
    wp_cache_delete( $user->user_nicename, 'userslugs' );

    if ( ! empty( $user->user_email ) ) {
        wp_cache_delete( $user->user_email, 'useremail' );
    }

    wp_cache_delete( $user->ID, 'user_meta' );
    wp_cache_set_users_last_changed();

    /** * Fires immediately after the given user's cache is cleaned. * * @since 4.4.0 * * @param int $user_id User ID. * @param WP_User $user User object. */
    do_action( 'clean_user_cache', $user->ID, $user );
}

Home | Imprint | This part of the site doesn't use cookies.