public function get_replies_query($ticket_id)
{
$q = wp_cache_get('replies_query_' . $ticket_id, 'wpas');
if (false === $q) {
$args = array('post_parent' => $ticket_id, 'post_type' => 'ticket_reply', 'post_status' => array('unread', 'read'), 'posts_per_page' => -1, 'orderby' => 'date', 'order' => 'ASC', 'no_found_rows' => true, 'cache_results' => false, 'update_post_term_cache' => false, 'update_post_meta_cache' => false);
$q = new WP_Query($args);
// Cache the result
wp_cache_add('replies_query_' . $ticket_id, $q, 'wpas', 600);
}
return $q;
}