About ten minutes.
I jest, but as short a time as practical. Store them in an airtight container in a cupboard.
I don't drink a lot of decaf, but I portion the beans and freeze them. My grinders are fine grinding them frozen, particularly in portion sizes. Decaf beans stay fresh a lot shorter time than regular, therefore good ones tend to be expensive.