add_resource_descriptor_to_registry(hash, descriptor_registry) should suffice since it auto-memoizes like this.