cache matrix init