Add an optional max_length paramater for paginate_all