Calculate the inverse of a matrix caching

Solution using caching to calculate the inverse of a matrix