R Programming: Caching the Inverse Matrix