Inverse with cache