I read it’s the ceder oil that deters them. Fresh ceder wood loses its oil after a few months.
My houses are between 125 - 150 years old. I have not touched any of the cedar components in the homes for 2 decades. Yet,
not one bug or rodent!!