[wp-trac] [WordPress Trac] #20486: Pass full post object to clean_post_cache()
WordPress Trac
wp-trac at lists.automattic.com
Thu Apr 19 12:10:56 UTC 2012
#20486: Pass full post object to clean_post_cache()
--------------------------+------------------
Reporter: duck_ | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.4
Component: Cache | Version:
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------
Comment (by duck_):
Replying to [comment:2 GaryJ]:
> The second patch still contains a few calls that pass a variable called
`$post_id` through instead of `$post`. Is that correct? (or can the
variables be renamed to be better self-documenting)
Yes. I updated the clean_post_cache() to reflect that it can be int or
object. This ticket should be "accept an object in clean_post_cache()" and
not "unconditionally switch to passing objects". The only situation that
the object is actually necessary is when the cache clean is called after a
database delete query when we want the object for its post type so we can
ensure that the `$taxonomy_relationship` cache is cleaned.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20486#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list