Feature/add option to tune output sizes online

With a large cache the underlying system may not be able to handle the dump of keys in one pass. Defaults to INT_MAX.