Solution for Caching the Inverse of a Matrix assignment