persist cache when commit