Emptying cache arrays to maintain consistency with referenced values