[wp-trac] [WordPress Trac] #36711: Add caching to get_page_by_path

WordPress Trac noreply at wordpress.org
Tue May 3 00:36:48 UTC 2016


#36711: Add caching to get_page_by_path
----------------------------------------+------------------------------
 Reporter:  spacedmonkey                |       Owner:
     Type:  enhancement                 |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Posts, Post Types           |     Version:  2.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch needs-unit-tests  |     Focuses:  performance
----------------------------------------+------------------------------

Comment (by boonebgorges):

 Replying to [comment:3 spacedmonkey]:
 > @ocean90 What unit tests should we be writing for this patch? I run the
 current tests and they are passing.

 At a minimum, I'd write one test that demonstrates that two subsequent,
 identical queries result in only one database query; and one test that
 demonstrates that running a query, updating the page, and then running the
 same query results in two database queries (and that the results of the
 second query match the post-update page).

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


More information about the wp-trac mailing list