I’m sure a lot of you have already been solving this challenge. What’s the best way to assign a name (of a member or of a club) to an immutable identifier of any kind? I mean, club names may change and members can change their names too. If I cache some data (e.g. how many team matches a member has tried to sign up for) and then a name gets changed, how easily find out that I already have some data cached for that name?
In theory, a good sollution would be to convert the current name of a member (or club) to an integer, which doesn’t need to hold any meaning, just be unique and immutable (hence the title of the thread). Some sort of a primary key candidate. Members register to Chess.com sequentially (and clubs are created in sequential order too), so the number in the registration order would be a candidate, if it’s accessible somehow.
So, what’s currently the best way to do this?