WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 6 years ago

#27459 closed defect (bug) (fixed)

unnecessary call of wp_cache_delete( 'get_pages', 'posts' ) in clean_post_cache()

Reported by: szaqal21 Owned by: wonderboymusic
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.7.1
Component: General Keywords: needs-patch
Focuses: performance Cc:

Description

Since results of get_pages() are cached as seperate keys:

$cache_key = "get_pages:$key:$last_changed";
...
wp_cache_set( $cache_key, $page_structure, 'posts' );

call of:

wp_cache_delete('get_pages', 'posts');

in

clean_post_cache()

does nothing, should be removed.

Change History (3)

#1 @szaqal21
7 years ago

  • Component changed from Cache API to General

#2 @wonderboymusic
6 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 4.0

Probably

#3 @wonderboymusic
6 years ago

  • Owner set to wonderboymusic
  • Resolution set to fixed
  • Status changed from new to closed

In 28875:

Remove obsolete wp_cache_delete('get_pages', 'posts') from clean_post_cache().

Fixes #27459.

Note: See TracTickets for help on using tickets.