Were the Achaemenids forgotten in medieval Persia?

by Ray192

So I noticed that apparently in the Shahnameh, there are no references to the Achaemenids at all, instead they were replaced completely by the mythical Kayanids. For example, in the Shahnameh and Darab Nama, Kai Darab is presented as the last Iranian king before the conquests of Alexander the Great, instead of Darius III, and as far as I can tell the Kayanid kings list bears no real resemblance to the Achaemenids.

And if we accept that the Shahnameh and other medieval Persian histories/legends are based on a Sassanian original (Khwaday-Namag), then this version of Persian history that omits the Achaemenids dates to the Sassanian era. I do remember hearing of Sassanians misidentifying various Achaemenid ruins and structures as Kayanid, but I can't find any references to it right now.

So my question is: why have the medieval/Sassanian Persian histories/legends chosen to omit the Achaemenids and replace them with the Kayanids? Is it ignorance due to previous suppression of texts? Or was it a conscious decision to rewrite Persian history in this way? Was there some shame attached to the Achaemenids (I assume shame led to the Seleucids being excluded completely, and decreasing the importance of the Parthians)?

I know that supposedly by the second half of Parthian era the Kings started to claim Achaemenid inheritance, so I assume the Achaemenids were at least known at the onset of the Sassanian era. So did references to the Achaemenids disappear during the Sassanian and medieval eras? If so, when did Persian society start talking about them again? If not, how did they reconcile the Achaemenids with the legends of the Kayanids? Was there active effort to espouse the Kayanid version of Persian history over the Achaemenid?

Ray192