[wp-trac] [WordPress Trac] #36906: Comment caches should be persistent
WordPress Trac
noreply at wordpress.org
Wed Jun 1 21:14:52 UTC 2016
#36906: Comment caches should be persistent
--------------------------+---------------------------
Reporter: boonebgorges | Owner: boonebgorges
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 4.6
Component: Comments | Version: 2.2
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------+---------------------------
Changes (by boonebgorges):
* keywords: needs-patch needs-unit-tests =>
* owner: => boonebgorges
* status: new => assigned
Comment:
Replying to [comment:11 ryan]:
> > It's likely that there are many places where we don't bother
invalidating because the cache only lasts for the page load.
>
> Exactly. Back when, the comment (and counts) groups didn't have the
invalidation needed to allow them to persist beyond a page load. We made
do with using non-persistent cache to reduce duplicate queries. I don't
recall exactly what invalidation was missing. Lots of changes (with which
I'm out of touch) have happened since, so maybe this is ready to become
persistent.
Thanks! This context is very helpful.
> In my patch, I implement clean_comment_cache in wp_insert_comment. The
last changed value is changed, but the create function should also call
the cache clear.
A new comment hasn't yet had a chance to be cached, so there's nothing to
be cleared. If I'm wrong, and calling `clean_comment_cache()` fixes a bug
here, please provide instructions on how to reproduce the bug. (Probably a
good topic for a separate ticket.) Otherwise, let's not add the overhead,
small as it may be.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/36906#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list