Pastry shelf life is influenced by moisture content, fat type, sugar level, fillings, storage conditions and packaging. High moisture and fresh dairy fillings generally shorten shelf life, while lower water activity and protective packaging can extend it.