[wp-trac] [WordPress Trac] #58175: Remove unused 'usermeta' global cache group

WordPress Trac noreply at wordpress.org
Mon Jun 19 05:54:02 UTC 2023


#58175: Remove unused 'usermeta' global cache group
-------------------------------------------------+-------------------------
 Reporter:  SergeyBiryukov                       |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  6.3
Component:  Cache API                            |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  good-first-bug has-patch has-unit-   |     Focuses:
  tests needs-testing needs-testing-info commit  |
-------------------------------------------------+-------------------------

Comment (by peterwilsoncc):

 == Test Report

 Testing the absence of something is quite challenging, so I validated the
 following:

 * `usermeta` is not used by WP Core Object Cache
 * `user_meta` is used by WP Core's Object Cache

 === Method

 1. Add xdebug conditional break points to `wp_cache_add()`,
 `wp_cache_add_multiple()`, `wp_cache_replace()` and `wp_cache_set()`
 1. For test run one, the condition is `$group === 'usermeta'`
 1. For test run two, the condition is `$group === 'user_meta'`


 For each test, I clicked on all admin pages, and the following front-end
 pages:
 - home
 - singular post
 - author
 - term archive

 === Environment
 - OS: macOS 12.6.6
 - Web Server: nginx/1.18.0
 - PHP: 7.4.33
 - WordPress: 6.3-alpha-55505-src
 - Browser: Firefox 114
 - Theme: Twenty Twenty-Two
 - Active Plugins: none

 === Actual Results
 - ✅ No breakpoints hit for the `usermeta` condition
 - ✅ All pages hit breakpoints for the `user_meta` condition

 I agree with Jonny above, this is ready for commit.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58175#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list