[wp-trac] [WordPress Trac] #43514: `get_pages()` DB query result not cached if nothing found

WordPress Trac noreply at wordpress.org
Fri Mar 9 21:03:33 UTC 2018


#43514: `get_pages()` DB query result not cached if nothing found
----------------------------------------+------------------------------
 Reporter:  flixos90                    |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Query                       |     Version:
 Severity:  normal                      |  Resolution:
 Keywords:  needs-unit-tests has-patch  |     Focuses:
----------------------------------------+------------------------------
Changes (by flixos90):

 * keywords:  needs-patch needs-unit-tests => needs-unit-tests has-patch


Comment:

 [attachment:43514.diff] ensures that the cache key is also set when the DB
 query returns no results. The initial check after retrieving the cached
 value has been adjusted accordingly to be more strict, like it is commonly
 handled in core (check if value is not `false`).

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


More information about the wp-trac mailing list