With regard to flour it does deteriorate quite dramatically if not used within a very short period.
If I haven't used flour within 3 months of purchase I tend to bin it.
I know the "shelf life" is supposed to be 12 months but I wouldn't dream of using flour that old.