[wp-trac] [WordPress Trac] #41131: Add caching to get_adjacent_post

WordPress Trac noreply at wordpress.org
Wed Jan 18 11:18:51 UTC 2023


#41131: Add caching to get_adjacent_post
-------------------------------------------------+-------------------------
 Reporter:  spacedmonkey                         |       Owner:
                                                 |  spacedmonkey
     Type:  enhancement                          |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Posts, Post Types                    |     Version:  2.5
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch has-unit-tests dev-        |     Focuses:
  feedback                                       |  performance
-------------------------------------------------+-------------------------
Changes (by spacedmonkey):

 * status:  reviewing => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55085" 55085]:
 {{{
 #!CommitTicketReference repository="" revision="55085"
 Posts, Post Types: Use persistent caching in `get_adjacent_post` function.

 The function `get_adjacent_post` cached the results of database query in
 the cache group `counts`. This is a none persistent group and meant cache
 would not persist on the next request. Change cache to save to the `posts`
 cache group. Cache invalidation is done by using get last changed value of
 the `posts` and `terms` group as a salt for the cache key.

 Props spacedmonkey, peterwilsoncc, johnbillion, boonebgorges, mukesh27,
 dd32.
 Fixes #41131.
 }}}

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


More information about the wp-trac mailing list