My implementation of the cached matrix inverse