#13108 closed defect (bug) (fixed)
install_popular_tags() should use a transient
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Optimization | Keywords: | needs-patch |
Focuses: | Cc: |
Description
install_popular_tags() should use a site transient, at present, this is the function:
function install_popular_tags( $args = array() ) { if ( ! ($cache = wp_cache_get('popular_tags', 'api')) && ! ($cache = get_option('wporg_popular_tags')) ) add_option('wporg_popular_tags', array(), '', 'no'); ///No autoload. if ( $cache && $cache->timeout + 3 * 60 * 60 > time() ) return $cache->cached; $tags = plugins_api('hot_tags', $args); if ( is_wp_error($tags) ) return $tags; $cache = (object) array('timeout' => time(), 'cached' => $tags); update_option('wporg_popular_tags', $cache); wp_cache_set('popular_tags', $cache, 'api'); return $tags;
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [15287]) Move plugin installer install_popular_tags() to use a site transient rather than its own caching logic. Fixes #13108