Complete cache matrix functions