Changeset 15287 for trunk/wp-admin/includes/plugin-install.php
- Timestamp:
- 06/19/2010 07:28:27 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/plugin-install.php
r14985 r15287 66 66 */ 67 67 function install_popular_tags( $args = array() ) { 68 if ( ! ($cache = wp_cache_get('popular_tags', 'api')) && ! ($cache = get_option('wporg_popular_tags')) ) 69 add_option('wporg_popular_tags', array(), '', 'no'); ///No autoload. 70 71 if ( $cache && $cache->timeout + 3 * 60 * 60 > time() ) 72 return $cache->cached; 68 $key = md5(serialize($args)); 69 if ( false !== ($tags = get_site_transient('poptags_' . $key) ) ) 70 return $tags; 73 71 74 72 $tags = plugins_api('hot_tags', $args); … … 77 75 return $tags; 78 76 79 $cache = (object) array('timeout' => time(), 'cached' => $tags); 80 81 update_option('wporg_popular_tags', $cache); 82 wp_cache_set('popular_tags', $cache, 'api'); 77 set_site_transient('poptags_' . $key, $tags, 10800); // 3 * 60 * 60 = 10800 83 78 84 79 return $tags;
Note: See TracChangeset
for help on using the changeset viewer.