It looks like this function is very similar to the one starting on line 448 - does it make sense to try and generalize that into a function that returns this.cache[alias]?