I have a query (see below) that gives a list of 10 news items ordered by the meta value "event_date" and filtered so that only posts earlier than today are displayed. This query is taking two seconds to process, so I am looking for a simple way to cache the results to get the load time faster. I already use WPEngine so I don't need any caching plugins. Thanks in advance for your help.
<?php $today = time();?> <?php $args = array( 'numberposts' => 10, 'orderby' => 'meta_value_num', 'order' => 'DESC', 'meta_key' => 'event_date', 'meta_query' => array( array( 'key' => 'event_date', 'value' => $today, 'compare' => '<=', 'type' => 'NUMERIC' ) ) ); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?>