Function completed to cache inverse.