ENH: cache the resolver