#13108 closed defect (bug) (fixed)
install_popular_tags() should use a transient
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Optimization | Version: | 3.0 |
| Severity: | normal | Keywords: | needs-patch |
| 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)
I realise i missed updating the DB version to cause that option to be removed. I'll leave it as-is for now and let it expire with the next db upgrade.
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