Refactor inverseFor cache