Napoleon - p82 boasted he could remember the names of every person he ever met. His technique was simple. If he didn’t hear the name clearly, he said, “So sorry I didn’t get the name clearly,” If it was an unusual name he would ask how is it spelled? During the conversation, he took the trouble to repeat the name several times, and tried to associate it in his mind with the persons features, expression and general appearance.
If they were of greater importance as soon as he was alone, he wrote it down on a piece of paper. Looked at it, concentrated on it, fixed it securely in his mind, and torn up the paper. (From How to win friends and influence people.)