fixed creating factories, registered listeners while creating proxy with getCache

fixes #4215
since a proxy newly created we need to register listeners