[wp-trac] [WordPress Trac] #47279: $post object passed to clean_post_cache action can contain outdated values

WordPress Trac noreply at wordpress.org
Fri Sep 5 09:51:06 UTC 2025


#47279: $post object passed to clean_post_cache action can contain outdated values
--------------------------------------+-----------------------------
 Reporter:  tabrisrp                  |       Owner:  (none)
     Type:  defect (bug)              |      Status:  new
 Priority:  normal                    |   Milestone:  Future Release
Component:  Posts, Post Types         |     Version:  2.5
 Severity:  normal                    |  Resolution:
 Keywords:  has-test-info needs-docs  |     Focuses:  docs
--------------------------------------+-----------------------------
Changes (by SirLouen):

 * keywords:  needs-unit-tests good-first-bug has-test-info needs-testing =>
     has-test-info needs-docs


Comment:

 Replying to [comment:3 peterwilsoncc]:
 > I think this is a documentation fix rather than a code fix. Changing the
 hook to `do_action( 'clean_post_cache', $post->ID, get_post( $post->ID )
 );` would trigger a database call for the post to reprime the cache.

 Ok, I need to dig a little further into this, but let's move this with
 some docs.

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


More information about the wp-trac mailing list