@bantu good point. Thanks for raising it. But the key gets only cached for the current request. Within one request the key should be the same.  createKeypair() is also called if a new user gets created in the user management or if user accounts get recovered in case of password lose. Therefore of course we need a new key every time we call the function but this are always independent requests. So it shouldn't be an issue here.