Added the basic implementation of the cache matrix object. No singualirty case checking is supported.