Make WordPress Core

Opened 7 years ago

Closed 14 months ago

#6860 closed enhancement (invalid)

Make clean_post_cache child cleaning optional

Reported by: arnee Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.5.1
Component: Posts, Post Types Keywords: has-patch gsoc
Focuses: performance Cc:


clean_post_cache() makes a MySQL query in every call to clean the cache for child posts. This should be optional if the caller knows that there are no child posts or they're not cached.

Background: I need to query all posts have to clean the post cache to stay within the memory limits. Before 2.5 this was fine with clean_post_cache, but since the update the php execution time increased extremely because of this additional db query.

Attachments (2)

clean_post_cache_recursive.patch (860 bytes) - added by arnee 7 years ago.
New argument $recursive (true by default)
6860.diff (829 bytes) - added by wojtek.szkutnik 5 years ago.

Download all attachments as: .zip

Change History (7)

@arnee7 years ago

New argument $recursive (true by default)

comment:1 @arnee7 years ago

  • Component changed from General to Optimization
  • Keywords has-patch added

comment:2 @ryan7 years ago

  • Milestone changed from 2.5.2 to 2.9

Milestone 2.5.2 deleted

comment:3 @Denis-de-Bernardy6 years ago

  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.9 to Future Release

@wojtek.szkutnik5 years ago

comment:4 @wojtek.szkutnik5 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch gsoc added; needs-patch removed

comment:5 @nacin14 months ago

  • Component changed from Optimization to Post Types
  • Focuses performance added
  • Milestone Future Release deleted
  • Resolution set to invalid
  • Status changed from new to closed

We fixed this a while ago, thank god. This was nasty.

Note: See TracTickets for help on using tickets.