In the end, trying to remember everything would be silly and largely a waste. But memorizing those things that are common (but not daily) pain points would probably be an improvement over not. OTOH, I'm not going to quantify my time sufficiently to be able to provide clear evidence that it really speeds up my work.
What you know is a Turing-complete subset with all the platform escape hatches you need, so you're able to get your stuff working.
Something like grep can easily meet the mark.
The XKCD comic you're thinking of is much more general^: https://xkcd.com/1205/
^ and not too helpful here because it assumes you know how much time something saves/costs - which isn't obvious for spaced repetition because the entire point is to dynamically adjust the timing & number of repetitions over the long run.
Example: I am almost never in need of grep. But sometimes I want to know which files in my project contain some string. Never could remember the right flags and order of arguments until I made it a flashcard--now I don't have to Google it anymore on those rare occasions when I need to know. Using flashcards for lots of little things like that really speeds up development; my cognitive switching costs are greatly diminished.