[wp-trac] [WordPress Trac] #42566: When I use wp_nav_menu I get a huge update_meta_cache query regardless of theme

WordPress Trac noreply at wordpress.org
Wed Jan 31 11:27:48 UTC 2018


#42566: When I use wp_nav_menu I get a huge update_meta_cache query regardless of
theme
--------------------------+-----------------------
 Reporter:  andyseaton83  |       Owner:
     Type:  defect (bug)  |      Status:  reopened
 Priority:  normal        |   Milestone:
Component:  Menus         |     Version:  4.8.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+-----------------------
Changes (by andyseaton83):

 * status:  closed => reopened
 * resolution:  invalid =>


Comment:

 Hi there,

 Sorry I've not replied to this in so long - the fix I put in place is
 working fine as the client hasn't asked to add any menu items, etc.

 However, I wanted to reopen the discussion as I'm not sure it is an issue
 that can be fixed with caching - I've implemented transient cache for the
 nav menu, and that works fine when the cache is present, but I still get
 the 20,000 rows problem when the cache has been deleted or garbaged.

 My main point is that I (as a developer) am not doing anything different
 to regular wordpress functions to call the menu - yet the inbuilt queries
 return a huge result set due to this update_meta_cache function. I can't
 believe that Wordpress needs to return 20,000 rows of a database for a
 menu that contains 80/90 items - hence why I believe it's a bug.

 If you could take another look I'd appreciate it.

 Andy

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


More information about the wp-trac mailing list