﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
19500,User deletion doesn't clear user_meta cache,duck_,ryan,"wp_delete_user() and wpmu_delete_user() leave user_meta in the cache. Example:

{{{
get_user_meta( $user_id );
wp_delete_user( $user_id );
var_dump( is_user_member_of_blog( $user_id ) ); // bool(true) instead of bool(false)
}}}

Possible solutions:

 1. Extend clean_user_cache() to delete from user_meta too
 2. delete_user_meta() in wp_delete_user() instead of direct query

Ryan wasn't keen on 1 as ""Most of the time clean_user_cache() doesn't need to touch meta cache"".

2. will introduce the delete(d)_user_meta actions when using wp_delete_user().

wp_cache_delete( $id, 'user_meta' ) in wp_delete_user() was also floated as a stop-gap measure, but since this will be fixed in a future release we can ignore the suggestion.

See: [comment:ticket:19160:6], #11761",defect (bug),closed,normal,3.4,Cache,3.2.1,normal,fixed,has-patch,
