Solution for the Caching the Inverse of a Matrix assignment