I love flashcards. One of the fun things about programming is that you can turn almost anything into a flashcard.
The secret of flashcards is spaced repetition. Just as something is slipping out of memory, flashcards force you to retrieve it. This strengthens the neural connections to the concept, just like exercising regularly strengthens your muscles.
You can use Anki to make your flashcards, because it automatically spaces out your repetition.
Practice every day. Put 'review Anki' in your todo/task list of choice.
Memorization gets a bad rap. In programming, some people will say 'I can just look it up in the docs when I need it!', or 'Programming isn't memorizing syntax, it's about knowing how to reason through problems.' Don't listen to these people.