[wp-trac] [WordPress Trac] #16894: Bulk load Comment Meta upon access
WordPress Trac
noreply at wordpress.org
Sun Sep 6 23:24:42 UTC 2015
#16894: Bulk load Comment Meta upon access
------------------------------+--------------------------
Reporter: dd32 | Owner: bradt
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 4.4
Component: Comments | Version: 3.1
Severity: normal | Resolution:
Keywords: has-patch commit | Focuses: performance
------------------------------+--------------------------
Changes (by dd32):
* status: closed => reopened
* resolution: fixed =>
Comment:
Since the committed direction is different to the proposed solutions..
* r33925 updates metadata caches upon comment listing, not upon comment
meta access. If you're using anything other than `wp_list_comments()` you
need to call `update_meta_cache()` manually.
`$comment_meta_cached` no longer really seems useful with this approach, a
lot has changed with comment caches since this ticket was created.
* `WP_Comment_Query` calls `update_comment_cache()` which only updates
the comment cache, no meta caches
* `WP_Comment_Query` doesn't trigger a metadata cache update
* `wp_list_comments()` triggers a comment metadata update for all
comments on all sites even if the site has no custom comment metadata
usage
So, I'd propose that maybe `update_comment_cache()` should be used here,
which should also handle comment meta, No flags, and review any
performance impacts always loading the cache will have.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/16894#comment:20>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list