Caching namespace/type references resolution