According to the FDA's food safety guidelines, mayonnaise-based pasta salads should be refrigerated within 2 hours after serving at room temperature. If you're serving macaroni salad at an outdoor party where it's 90 degrees F or warmer, refrigerate it within 1 hour. Anything mayo-based potato salad or pasta salad out longer than that should be discarded, just to be on the safe side.