Changeset 9527 for sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
- Timestamp:
- 02/21/2020 04:09:12 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/theme-directory/class-themes-api.php
r9526 r9527 448 448 $cache_key = sanitize_key( __METHOD__ . ':' . get_locale() . ':' . md5( serialize( $this->request ) . serialize( $this->fields ) ) ); 449 449 if ( false !== ( $this->response = wp_cache_get( $cache_key, $this->cache_group ) ) && empty( $this->request->cache_buster ) ) { 450 451 // TODO: Remove this debug after Feb 21st 2020. See #3215. 452 // DEBUG - Attempt to skip the cache when it only contains one theme when it should contain many. 453 if ( 454 isset( $this->request->browse ) && 455 'popular' === $this->request->browse && 456 $this->response->info['results'] <= 1 457 ) { 458 // The cache is bad. Don't use it. 459 $this->response = false; 460 } else { 461 // The cache is good, use it. 462 return; 463 } 464 450 return; 465 451 } 466 452
Note: See TracChangeset
for help on using the changeset viewer.