[wp-trac] [WordPress Trac] #37184: Stop FOUND_ROWS running in comment query is cached

WordPress Trac noreply at wordpress.org
Thu Jul 7 14:21:58 UTC 2016


#37184: Stop FOUND_ROWS running in comment query is cached
----------------------------------------+---------------------------
 Reporter:  spacedmonkey                |       Owner:  boonebgorges
     Type:  defect (bug)                |      Status:  accepted
 Priority:  high                        |   Milestone:  4.6
Component:  Comments                    |     Version:  4.4
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:
----------------------------------------+---------------------------
Changes (by boonebgorges):

 * status:  reviewing => accepted


Comment:

 > We save max pages as it is only generated when no_found_rows is set to
 false. Please see this comment [37868] where we have done the same in
 WP_Site_Query.

 The cache should hold as little information as possible, to avoid cache
 bloat and potential bugs related to improper invalidation. Values that can
 be computed arithmetically from known values should not be cached for
 these reasons. IMO [37868] sets a bad precedent in this regard.

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


More information about the wp-trac mailing list