Cache client ID in the master's class
The client doesn't change its id while connected to the master. So cache it on connection, making the inserts for the given client faster and simpler across the code.
The client doesn't change its id while connected to the master. So cache it on connection, making the inserts for the given client faster and simpler across the code.