Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#19726 closed enhancement (fixed)

Don't update the post_thumbnail_cache if the thumbnail is already cached

Reported by: prettyboymp Owned by:
Priority: normal Milestone: 3.4
Component: Performance Version: 3.3
Severity: normal Keywords: has-patch needs-testing
Cc: Focuses:

Description

There is no reason to run the query in update_post_thumbnail_cache() if all of the thumbnail posts are already cached. Before adding a post_id to the thumb_ids array, cache should be checked.

Attachments (1)

19726.diff​ (682 bytes ) - added by prettyboymp 15 years ago.

Download all attachments as: .zip

Change History (5)

#1 @nacin
15 years ago

  • Milestone Awaiting Review → 3.4

Nice.

@prettyboymp
15 years ago

#2 @prettyboymp
15 years ago

The attachment also fixes a bug where the update_post_thumbnail_cache() actually doesn't help anything when running object cache since the wp_query param cache_results defaults to false if you're running object cache.

#3 @prettyboymp
15 years ago

  • Keywords has-patch needs-testing added

#4 @duck_
15 years ago

  • Resolution → fixed
  • Status new → closed

[19918] should do the trick.

Note: See TracTickets for help on using tickets.