Cats have selective memory, so they don't remember people they see rarely.
There is only one way to make a cat remember you the first time you meet.
A cat will remember a guest only in one case - if the memory of him is unpleasant, for example, if the person frightens her.
And the cat will remember him only in order to stay away from this person the next time they meet.
If the guest was kind and affectionate to the cat, she will soon forget him.
Therefore, there is no point in trying to make friends with the cat of someone you rarely visit.