* fix(client): cache subsequent clients we dont need to recreate a client if its config hasnt changed fixes #2954 * handle circular structures * make cache generic