bakery or homemade cookies can be stored at room temperature two to three weeks or two months in the refrigerator. cookies retain their quality when stored in the freezer for eight to 12 months. moist bars, such as cheesecake and lemon bars, can be refrigerated for seven days.