Updated cache matrix methods