Subquery cache results