It depends. Sometimes yes and sometimes no. It helps to have good search skills because SPECIFIC Computer related knowledge is notorious for deteriorating over time.
I was good at DOS programming back in the day. But if was to do anything now I would go look it up in my trusty copy of PC System Programming. So while I don't remember all the ins and outs of assembly and interrupts I do remember where to find it.
On the other hand knowledge of general concepts of math, programming design, good practices, etc they tend to stick with you and gets refined over the decades. The experience you accumulate from applying these concepts to a variety of languages, APIs, and platforms doesn't go away.
Which I why when I hire programmers I look for good problem solving skills, a strong foundation in the fundamentals, and a diverse range of experiences, rather than someone who a hotdog with a specific API or Tool. Because the skills behind these are timeless while the specifics can always be picked up from a book or using google.
Note that if you are looking to do time sensitive then you may be better off hiring the API hotdog. But I consider that a specialty situation. In most cases you are hiring for the long terms and want the most out of your hire over the long term.