WordPress.org

Making WordPress.org

Changeset 3224


Ignore:
Timestamp:
05/24/2016 02:20:04 AM (6 years ago)
Author:
obenland
Message:

Plugin Directory: Revert [3218].

No need to cache query results, now that we use Advanced Post Caching.

See https://wordpress.slack.com/archives/meta/p1464048153001825
See #1719.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/themes/pub/wporg-plugins/front-page.php

    r3218 r3224  
    2727
    2828        <?php foreach ( $sections as $section_slug => $section_title ) :
    29             if ( false === ( $section_query = wp_cache_get( "{$section_slug}:front_page", 'wporg-plugins' ) ) ) :
    30                 $section_args = array(
    31                     'post_type'       => 'plugin',
    32                     'posts_per_page'  => 4,
    33                     'plugin_category' => $section_slug,
    34                 );
     29            $section_args = array(
     30                'post_type'       => 'plugin',
     31                'posts_per_page'  => 4,
     32                'plugin_category' => $section_slug,
     33            );
    3534
    36                 if ( 'popular' === $section_slug ) :
    37                     $section_args['meta_key'] = 'active_installs';
    38                     $section_args['orderby']  = 'meta_value_num';
    39                     unset( $section_args['plugin_category'] );
    40                 endif;
     35            if ( 'popular' === $section_slug ) :
     36                $section_args['meta_key'] = 'active_installs';
     37                $section_args['orderby']  = 'meta_value_num';
     38                unset( $section_args['plugin_category'] );
     39            endif;
    4140
    42                 $section_query = new \WP_Query( $section_args );
    43                 wp_cache_set( "{$section_slug}:front_page", $section_query, 'wporg-plugins', DAY_IN_SECONDS );
    44             endif;
     41            $section_query = new \WP_Query( $section_args );
    4542        ?>
    4643
Note: See TracChangeset for help on using the changeset viewer.