use n_tasks from cache lib