further speedup: reusing cached conditionaldotproduct for computing partitioncache