Cache answers for queries in nodes. Return answers appropriately.