use an output handler to avoid keeping a large list of tuples when evicting