Matrix inverse cache functions implemented