Updating cache matrix code