[wp-trac] [WordPress Trac] #54316: clean_user_cache() doesn't clear the user_meta cache

WordPress Trac noreply at wordpress.org
Mon Oct 25 05:20:56 UTC 2021


#54316: clean_user_cache() doesn't clear the user_meta cache
--------------------------+------------------------------
 Reporter:  dd32          |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Users         |    Version:
 Severity:  normal        |   Keywords:  needs-unit-tests
  Focuses:                |
--------------------------+------------------------------
 Calling clean_user_cache() doesn't clear the user_meta cache, which can
 cause odd behaviours when the reason for calling it is that the user or
 usermeta DB tables have been altered.

 Additionally, there is no API for clearing the metadata caches, other than
 performing a direct `wp_cache_delete( $id, 'user_meta' );`.

 See attached PR.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54316>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list