[wp-trac] [WordPress Trac] #18356: get_bookmarks() indefinitely caches randomly ordered results

WordPress Trac noreply at wordpress.org
Sat Aug 22 20:22:00 UTC 2015


#18356: get_bookmarks() indefinitely caches randomly ordered results
-----------------------------------+------------------------------
 Reporter:  prettyboymp            |       Owner:
     Type:  defect (bug)           |      Status:  reopened
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Query                  |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:  has-patch needs-refresh => has-patch 2nd-opinion


Comment:

 A separate cache bucket for randomly ordered results seems fine to me. It
 makes for a funny structure to the cache - the non-random results are
 stored in a multi-d array in a single cache slot, while random results get
 their own top-level cache slot - but I guess that's not such a big deal,
 given that the cache strategies are different in the two cases.

 I don't see a good reason to expose `'expire'` as a function parameter. In
 [attachment:18356.4.diff], I moved it to a filtered value.

 This seems like a good fix IMO, but would like a second opinion before
 moving forward.

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


More information about the wp-trac mailing list