[wp-trac] [WordPress Trac] #22503: wp_mime_type_icon() fails to properly cache icons
WordPress Trac
noreply at wordpress.org
Mon Nov 19 08:30:46 UTC 2012
#22503: wp_mime_type_icon() fails to properly cache icons
-------------------+--------------------------
Reporter: nacin | Type: defect (bug)
Status: new | Priority: normal
Milestone: 3.5 | Component: Cache
Version: | Severity: normal
Keywords: |
-------------------+--------------------------
It does this:
{{{
$icon_files = wp_cache_get('icon_files');
}}}
And:
{{{
wp_cache_set('icon_files', $icon_files, 600);
}}}
See the issue? I spent an embarrassing amount of time debugging the
caching backend before I did. The timeout of "600" is actually the cache
group in that call. We need to slip in a 'default' there.
Noticed while doing profiling for #22186. If you're calling this function
for a whole bunch of attachments, all of those repetitive disk scans can
slow things down quite a bit.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22503>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list