Added feature of checking if repartition when caching partail aggregates