Cache results of unions and intersections